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},
}