{"id":13493219,"url":"https://github.com/Libr-AI/OpenFactVerification","last_synced_at":"2025-03-28T11:32:23.050Z","repository":{"id":231868694,"uuid":"777138289","full_name":"Libr-AI/OpenFactVerification","owner":"Libr-AI","description":"Loki: Open-source solution designed to automate the process of verifying factuality","archived":false,"fork":false,"pushed_at":"2024-06-02T18:20:08.000Z","size":44489,"stargazers_count":938,"open_issues_count":0,"forks_count":39,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-09-01T20:41:28.279Z","etag":null,"topics":["ai","factuality","hallucination"],"latest_commit_sha":null,"homepage":"https://loki.librai.tech/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Libr-AI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-25T09:24:14.000Z","updated_at":"2024-08-31T01:51:31.000Z","dependencies_parsed_at":"2024-06-02T20:10:24.610Z","dependency_job_id":null,"html_url":"https://github.com/Libr-AI/OpenFactVerification","commit_stats":null,"previous_names":["libr-ai/openfactverification"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Libr-AI%2FOpenFactVerification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Libr-AI%2FOpenFactVerification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Libr-AI%2FOpenFactVerification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Libr-AI%2FOpenFactVerification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Libr-AI","download_url":"https://codeload.github.com/Libr-AI/OpenFactVerification/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222376246,"owners_count":16974312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","factuality","hallucination"],"created_at":"2024-07-31T19:01:13.283Z","updated_at":"2024-10-31T07:31:25.052Z","avatar_url":"https://github.com/Libr-AI.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cbr /\u003e\n    \u003ca href=\"https://www.librai.tech\"\u003e\n      \u003cimg alt=\"LibrAI Logo\" src=\"./assets/librai_librai.png\" alt=\"LibrAI Logo\" width=\"50%\" height=\"auto\"\u003e\n    \u003c/a\u003e\n  \u003cbr /\u003e\n\u003c/div\u003e\n\n# Loki: An Open-source Tool for Fact Verification\n\n## Overview\nLoki is our open-source solution designed to automate the process of verifying factuality. It provides a comprehensive pipeline for dissecting long texts into individual claims, assessing their worthiness for verification, generating queries for evidence search, crawling for evidence, and ultimately verifying the claims. This tool is especially useful for journalists, researchers, and anyone interested in the factuality of information. To stay updated, please subscribe to our newsletter at [our website](https://www.librai.tech/) or join us on [Discord](https://discord.gg/ssxtFVbDdT)!\n\n\n## Quick Start\n\n### Clone the repository and navigate to the project directory\n```bash\ngit clone https://github.com/Libr-AI/OpenFactVerification.git\ncd OpenFactVerification\n```\n\n### Installation with poetry (option 1)\n1. Install Poetry by following it [installation guideline](https://python-poetry.org/docs/).\n2. Install all dependencies by running:\n```bash\npoetry install\n```\n\n### Installation with pip (option 2)\n1. Create a Python environment at version 3.9 or newer and activate it.\n\n2. Navigate to the project directory and install the required packages:\n```bash\npip install -r requirements.txt\n```\n\n### Configure API keys\n\nYou can choose to export essential api key to the environment\n\n- Example: Export essential api key to the environment\n```bash\nexport SERPER_API_KEY=... # this is required in evidence retrieval if serper being used\nexport OPENAI_API_KEY=... # this is required in all tasks\n```\n\nAlternatively, you configure API keys via a YAML file, see [user guide](docs/user_guide.md) for more details.\n\nA sample test case:\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"./assets/cmd_example.gif\" alt=\"drawing\" width=\"80%\"/\u003e\n\u003c/div\u003e\n\n## Usage\n\nThe main interface of Loki fact-checker located in `factcheck/__init__.py`, which contains the `check_response` method. This method integrates the complete fact verification pipeline, where each functionality is encapsulated in its class as described in the Features section.\n\n#### Used as a Library\n\n```python\nfrom factcheck import FactCheck\n\nfactcheck_instance = FactCheck()\n\n# Example text\ntext = \"Your text here\"\n\n# Run the fact-check pipeline\nresults = factcheck_instance.check_response(text)\nprint(results)\n```\n\n#### Used as a Web App\n```bash\npython webapp.py --api_config demo_data/api_config.yaml\n```\n\n#### Multimodal Usage\n\n```bash\n# String\npython -m factcheck --modal string --input \"MBZUAI is the first AI university in the world\"\n# Text\npython -m factcheck --modal text --input demo_data/text.txt\n# Speech\npython -m factcheck --modal speech --input demo_data/speech.mp3\n# Image\npython -m factcheck --modal image --input demo_data/image.webp\n# Video\npython -m factcheck --modal video --input demo_data/video.m4v\n```\n\n\n#### Customize Your Experience\nFor advanced usage, please see our [user guide](docs/user_guide.md).\n\n## [Try Our Online Service](https://aip.librai.tech/login)\n\n\u003c!-- 💪 **Join Our Journey to Innovation with the Supporter Edition** --\u003e\n\nAs we continue to evolve and enhance our fact-checking solution, we're excited to invite you to become an integral part of our journey. By registering for our Supporter Edition, you're not just unlocking a suite of advanced features and benefits; you're also fueling the future of trustworthy information.\n\n\nBelow is a screenshot of our online service.\n[Click here  to try it now!](https://aip.librai.tech/login)\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"./assets/online_screenshot.png\" alt=\"drawing\" width=\"80%\"/\u003e\n\u003c/div\u003e\n\n\u003c!--\nYour support enables us to:\n\n🚀 Innovate continuously: Develop new, cutting-edge features that keep you ahead in the fight against misinformation.\n\n💡 Improve and refine: Enhance the user experience, making our app not just powerful, but also a joy to use.\n\n🌱 Grow our community: Invest in the resources and tools our community needs to thrive and expand.\n\n🎁 And as a token of our gratitude, registering now grants you **complimentary token credits**—a little thank you from us to you, for believing in our mission and supporting our growth!\n\n\u003cdiv align=\"center\"\u003e\n\n| Feature                                | Open-Source Edition | Supporter Edition |\n|----------------------------------------|:-------------------:|:------------------:|\n| Trustworthy Verification Results       | ✅                   | ✅                  |\n| Diverse Evidence from the Open Web     | ✅                   | ✅                  |\n| Automated Correction of Misinformation | ✅                   | ✅                  |\n| Privacy and Data Security              | ✅                   | ✅                  |\n| Multimodal Input                       | ✅                   | ✅                  |\n| One-Stop Custom Solution               | ❌                   | ✅                  |\n| Customizable Verification Data Sources | ❌                   | ✅                  |\n| Enhanced User Experience               | ❌                   | ✅                  |\n| Faster Efficiency and Higher Accuracy  | ❌                   | ✅                  |\n\n\u003c/div\u003e --\u003e\n\n\n\n## Contributing to Loki project\n\nWelcome and thank you for your interest in the Loki project! We welcome contributions and feedback from the community. To get started, please refer to our [Contribution Guidelines](https://github.com/Libr-AI/OpenFactVerification/tree/main/docs/CONTRIBUTING.md).\n\n### Acknowledgments\n- Special thanks to all contributors who have helped in shaping this project.\n\n\u003c!---\nadd slack channel here\n--\u003e\n\n\n### Stay Connected and Informed\n\nDon’t miss out on the latest updates, feature releases, and community insights! We invite you to subscribe to our newsletter and become a part of our growing community.\n\n💌 Subscribe now at [our website](https://www.librai.tech/)!\n\n\n\n## Star History\n\n\u003e [![Star History Chart](https://api.star-history.com/svg?repos=Libr-AI/OpenFactVerification\u0026type=Date)](https://star-history.com/#Libr-AI/OpenFactVerification\u0026Date)\n\n## Cite as\n```\n@misc{li2024lokiopensourcetoolfact,\n      title={Loki: An Open-Source Tool for Fact Verification}, \n      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},\n      year={2024},\n      eprint={2410.01794},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL},\n      url={https://arxiv.org/abs/2410.01794}, \n}\n```\n","funding_links":[],"categories":["📦 Legacy \u0026 Inactive Projects","Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLibr-AI%2FOpenFactVerification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLibr-AI%2FOpenFactVerification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLibr-AI%2FOpenFactVerification/lists"}