OpenFactVerification
v0.0.2
Loki是我們的開源解決方案,旨在自動化驗證事實的過程。它提供了一條全面的管道,可以將長期文本剖分為個人主張,評估其驗證的價值,為搜索搜索,爬行證據以及最終驗證索賠的查詢。該工具對記者,研究人員以及對信息的事實感興趣的任何人特別有用。要保持更新,請在我們的網站上訂閱我們的新聞通訊,或加入我們的不和諧!
git clone https://github.com/Libr-AI/OpenFactVerification.git
cd OpenFactVerification
poetry install
在3.9版或更新版本中創建Python環境並激活它。
導航到項目目錄並安裝所需的軟件包:
pip install -r requirements.txt
您可以選擇將Essential API密鑰導出到環境
export SERPER_API_KEY=... # this is required in evidence retrieval if serper being used
export OPENAI_API_KEY=... # this is required in all tasks
另外,您可以通過YAML文件配置API鍵,請參閱用戶指南以獲取更多詳細信息。
樣本測試案例:
Loki Fact-Checker的主要接口位於factcheck/__init__.py
中,其中包含check_response
方法。此方法集成了完整的事實驗證管道,其中每個功能都按照功能部分所述封裝在其類中。
from factcheck import FactCheck
factcheck_instance = FactCheck ()
# Example text
text = "Your text here"
# Run the fact-check pipeline
results = factcheck_instance . check_response ( text )
print ( results )
python webapp.py --api_config demo_data/api_config.yaml
# String
python -m factcheck --modal string --input " MBZUAI is the first AI university in the world "
# Text
python -m factcheck --modal text --input demo_data/text.txt
# Speech
python -m factcheck --modal speech --input demo_data/speech.mp3
# Image
python -m factcheck --modal image --input demo_data/image.webp
# Video
python -m factcheck --modal video --input demo_data/video.m4v
有關高級用法,請參閱我們的用戶指南。
隨著我們繼續發展和增強事實檢查解決方案,我們很高興邀請您成為我們旅程的組成部分。通過註冊我們的支持者版,您不僅要解鎖一套高級功能和好處;您還可以推動值得信賴的信息的未來。
以下是我們在線服務的屏幕截圖。單擊此處立即嘗試!
歡迎並感謝您對Loki項目的興趣!我們歡迎社區的捐款和反饋。要開始,請參考我們的貢獻指南。
不要錯過最新更新,功能發行和社區見解!我們邀請您訂閱我們的新聞通訊,並成為我們成長中的社區的一部分。
?立即在我們的網站上訂閱!
@misc{li2024lokiopensourcetoolfact,
title={Loki: An Open-Source Tool for Fact Verification},
author={Haonan Li and Xudong Han and Hao Wang and Yuxia Wang and Minghan Wang and Rui Xing and Yilin Geng and Zenan Zhai and Preslav Nakov and Timothy Baldwin},
year={2024},
eprint={2410.01794},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2410.01794},
}