@Promixyz: AI fact-checking is getting f...cking unfair 10 open-source GitHub projects for making agents prove what they write ins…
Summary
该推文盘点了 10 个用于让 AI 智能体为其输出提供可验证证据的开源 GitHub 项目,涵盖科学文献检索(OpenScholar、PaperQA2)、文档解析(Docling)、网络爬取(Crawl4AI)、RAG(RAGFlow、GraphRAG、LightRAG)、深度研究(Open Deep Research)以及事实核查与评估(DeepEval、Ragas),并重点展示了 Allen AI 的 OpenScholar 代码库。
View Cached Full Text
Cached at: 10/04/26, 05:18 PM
AI fact-checking is getting f…cking unfair
10 open-source GitHub projects for making agents prove what they write instead of just generating an answer
01 OpenScholar ▸ https://github.com/AkariAsai/OpenScholar… → search + synthesize scientific literature
02 PaperQA2 ▸ https://github.com/Future-House/paper-qa… → answers grounded in papers + citations
BUILD THE EVIDENCE
03 Docling ▸ https://github.com/docling-project/docling… → PDFs + tables + documents → structured data
04 Crawl4AI ▸ https://github.com/unclecode/crawl4ai… → web pages → clean AI-ready evidence
05 RAGFlow ▸ https://github.com/infiniflow/ragflow… → retrieve evidence from complex documents
CONNECT THE CLAIMS
06 GraphRAG ▸ https://github.com/microsoft/graphrag… → map entities + relationships across sources
07 LightRAG ▸ https://github.com/HKUDS/LightRAG → retrieve across connected knowledge
CROSS-CHECK EVERYTHING
08 Open Deep Research ▸ https://github.com/langchain-ai/open_deep_research… → research across multiple sources
09 DeepEval ▸ https://github.com/confident-ai/deepeval… → evaluate whether the output actually holds up
10 Ragas ▸ https://github.com/explodinggradients/ragas… → measure retrieval + answer quality
the evidence loop:
question → split → search → extract → link facts → compare sources → check claims → cite → report
47 sources can become 30 claims 30 claims can become 26 citations
but only after the agent checks which evidence actually supports what it wants to say
that’s the difference
AI can generate an answer in seconds
the interesting stack is the one that can show you why you should believe it ⭣
AkariAsai/OpenScholar
Source: https://github.com/AkariAsai/OpenScholar
OpenScholar
This repository contains the code bases of OpenScholar.
Blog | Demo | Paper | Model checkpoints and data | ScholarQABench | Expert Evaluation | Public demo code | Public demo data
Table of contents
- Overview of OpenScholar
- Repository Organizations
- Installation
- Run OpenScholar
- Train OpenScholar-8B
- Run Retriever
- Contact and Citation
Overview of OpenScholar
Scientific progress hinges on our ability to find, synthesize, and build on relevant knowledge from the scientific literature. However, the exponential growth of this literature—with millions of papers now published each year—has made it increasingly difficult for scientists to find the information they need or even stay abreast of the latest findings in a single subfield.
To help scientists effectively navigate and synthesize scientific literature, we introduce OpenScholar, a retrieval-augmented language model (LM) designed to answer user queries by first searching for relevant papers in the literature and then generating responses grounded in those sources. Try open-scholar.allen.ai/ and check our paper for more detail.

Repository Organizations
This repository contains codes to run OpenScholar inference.
src/: Main source codes for OpenScholar.training/: Our training code to train Llama 3.1 8B using our processed data. We modified earlier version oftorchtunefor training.retriever/: Code base to run retrieval offline & host retrieval servers for online retrieval.
For automatic and human evaluations, please check the following repositories.
- To run evaluations on ScholarQABench, please check the ScholarQABench repository.
- For our human evaluation interfaces as well as the results, please check the OpenScholar_ExpertEval repository.
Installation
To run OpenScholar inference, please ensure that all necessary libraries are installed.
[test environment command]
conda create -n os_env python=3.10.0
conda activate os_env
pip install -r requirements.txt
python -m spacy download en_core_web_sm
Also please set the following API keys:
export S2_API_KEY=YOUR_S2_API_KEY
See instructions to acquire API keys at Semantic Scholar API Page.
If you want to also want to use web search engine, then sign up for you.com web API and set the key.
export YOUR_API_KEY=YOUR_YOU_COM_API_KEY
For information related to OpenScholar training and retriever components, refer to the training/ and retrieval/ directories, respectively.
Run OpenScholar inference
By default, OpenScholar takes retrieval results from off-line retrieval results after running the retrieval scripts in retrieval/, followed by additional retrieval from Semantic Scholar Paper API and web search API results. See the script src/use_search_apis.py to retrieve related passages offline using external APIs.
We released our retrieval results at google drive.
Use Open LMs (e.g., Llama-3.1_OpenScholar-8B) locally
- Run a Standard RAG pipeline using top 10
python run.py \
--input_file YOUR_INPUT_FILE \
--model_name OpenScholar/Llama-3.1_OpenScholar-8B \
--use_contexts \
--output_file OUTPUT_FILE_PATH \
--top_n 10 --llama3 --zero_shot
- Run a Retriever+ Reranker Pipeline
python run.py \
--input_file YOUR_INPUT_FILE \
--model_name OpenScholar/Llama-3.1_OpenScholar-8B \
--use_contexts \
--ranking_ce \
--reranker OpenScholar/OpenScholar_Reranker \
--output_file OUTPUT_FILE_PATH \
--top_n 10 --llama3 --zero_shot
- Run Open Retriever Self-reflective Generation pipeline
python run.py \
--input_file YOUR_INPUT_FILE \
--model_name OpenScholar/Llama-3.1_OpenScholar-8B \
--use_contexts --output_file OUTPUT_FILE_NAME \
--top_n 10 --llama3 --use_contexts \
--ranking_ce --reranker OpenScholar/OpenScholar_Reranker \
--posthoc --feedack --ss_retriever \
--use_abstract --norm_cite --zero_shot --max_per_paper 3 \
Use propriety LMs e.g., OpenAI GPT4o
You can also combine the OpenScholar pipeline with propriety LLMs, by specifying model_name, api and api_key_fp.
python run.py \
--input_file YOUR_INPUT_FILE \
--model_name "gpt-4o" \
--api "openai" \
--api_key_fp PATH_TO_YOUR_OPEN_AI_KEY \
--use_contexts \
--output_file OUTPUT_FILE_PATH \
--top_n 10 --llama3 --zero_shot
Details of configurations
Below, we provide the detailed of configurations.
top_n: The number of passages to be fed into the underlying LM. By default, we use10for multi-paper tasks.feedback: Set true if you want to use the self-feedback loop during generation.posthoc_at: Set true if you want to run posthoc citation attributionszero_shot: Set true if you want to run inference in a zero-shot manner.ranking_ce: Use a reranking model to reranktop_npassages; If not set true, we take thetop_npassages from thectxsin the provided input file.reranker: Specify the path to the reranker model file (local or HF hub). If you use our OpenScholar reranker, setOpenScholar/OpenScholar_Rerankermin_citation: You can set the minimum number of citations. If anyintis given, we exclude papers whose citations is belowmin_citation. By default, we set it toNoneand all papers are considered regardless of their citation counts.ss_retriever: Use semantic scholar API during the feedback generation loop to enhance the feedback results.use_abstract: Consider abstract to enhance the reranking results.max_per_paper: set the maximum number of passages from the same paper used during inference time.task_name: specify the task names when you run the single paper tasks. For SciFact, PubmedQA and QASA, the corresponding task names areclaim_full,boolean_question_fullandsingle_qa, respectively.
Training
Embedding model training
- We trained our embedding model using peS2o, which is used to form the OpenScholar Datastore.
- We used the Contriever code base to continue pre-training contriever (base), using the training script.
Reranker model training
- We trained our reranker model using FlagEmbeddings.
- We formatted our reranker training data, following the original repo instructions, and then trained BGE reranker large with torch tune.
torchrun --nproc_per_node {number of gpus} \
-m FlagEmbedding.reranker.run \
--output_dir {path to save model} \
--model_name_or_path BAAI/bge-reranker-base \
--train_data PATH_TO_TRAIN_DATA \
--learning_rate 6e-5 \
--fp16 \
--num_train_epochs 5 \
--per_device_train_batch_size {batch size; set 1 for toy data} \
--gradient_accumulation_steps 4 \
--dataloader_drop_last True \
--train_group_size 16 \
--max_len 512 \
--weight_decay 0.01 \
--logging_steps 10
Generator LM training
- We trained our OpenScholar-8B using our OpenScholar/OS_Train_Data data, which consists of 13k instruction-tuning data. We use our modified version of torchtune to train our 8B model using 8*A100.
See mode detailed instructions for setting up the training in train/
Run Retriever
Both our peS2o v2 and v3 datastore (chunked text + index) are available:
See instructions under retriever to run the peS2o index locally. Note that due to the massive-scale of index (200+M embeddings based on 45 million papers), the peS2o retriever requires a lot of CPU memory. In our main experiments, we retrieved initial passages offline.
We are planning to release our efficient sparse-dense retriever API endpoint used for the OpenScholar Demo publicly via Semantic Scholar API to accelerate research for LLMs for scientific literature synthesis. Stay tune!!d!
Contact and Citation
If you have any questions, please contact [email protected]. Note that I am currently applying for academic jobs so I may be slow to respond.
If you have any questions related to demo, please file your request from google form.
@article{openscholar,
title={{OpenScholar}: Synthesizing Scientific Literature with Retrieval-Augmented Language Models},
author={Asai, Akari and He*, Jacqueline and Shao*, Rulin and Shi, Weijia and Singh, Amanpreet and Chang, Joseph Chee and Lo, Kyle and Soldaini, Luca and Feldman, Tian, Sergey and Mike, D’arcy and Wadden, David and Latzke, Matt and Minyang and Ji, Pan and Liu, Shengyan and Tong, Hao and Wu, Bohao and Xiong, Yanyu and Zettlemoyer, Luke and Weld, Dan and Neubig, Graham and Downey, Doug and Yih, Wen-tau and Koh, Pang Wei and Hajishirzi, Hannaneh},
journal={Arxiv},
year={2024},
}
Similar Articles
@Lummox_eth: GitHub makes AI research f…cking dangerous 8 open-source GitHub projects that turn a question into sources, evidence, c…
A curated roundup of 8 open-source GitHub projects — including GPT Researcher, STORM, Perplexica, Crawl4AI, PaperQA2, Docling, GraphRAG, and LightRAG — that turn a research question into sourced, cross-checked, evidence-backed reports.
@xiaoying_eth: These 10 GitHub repositories shouldn't only be known by programmers. 1. TradingAgents – an AI investment analyst team. Four analysts (fundamentals, sentiment, news, technical) discuss strategies together, backed by a risk manager and execution agents. It's like stuffing a mini Wall Street team into your...
Recommends 10 practical open-source GitHub projects, covering AI investment analysis, multi-model chat client, video generation engine, financial terminal, automated short video generation, AI email client, voice cloning, domain information collection, Claude skill sets, and API integration, etc.
@ChrisSlacker: 50 Super Useful GitHub Repos 1. iFixAi — AI Alignment Testing → https://t.co/70ZaaoerS3 2. public-apis — Free API Collection → https://t.co/x0Lqj0ww9B 3. buil…
A handpicked list of 50 practical GitHub repositories covering AI alignment testing, API collections, learning resources, AI agent frameworks, large model inference tools, and more — great for developers and AI practitioners to bookmark.
@FakeMaidenMaker: Folks, we've dug up another AI engineering treasure: Hands-On-AI-Engineering. Just open-sourced, it already hit 2.3K stars. One repo stuffed with over 50 real AI projects that you can run directly. The most practical part is it doesn't talk about vague theories; each project is a complete little…
Recommends the freshly open-sourced GitHub repo Hands-On-AI-Engineering with 2.3K stars, containing over 50 runnable AI projects covering RAG, AI agent, OCR, and more. Each project provides full code and instructions, suitable for hands-on learning.
@0xCheshire: I researched how to remove the AI tone and found 7 different GitHub projects: for Chinese rewriting, English rewriting, technical writing, and complete writing workflows, each with corresponding options. 1. qu-ai-wei (299 stars) Chinese de-AI Skill, which handles clichés, abstract expressions...
Introduces 7 GitHub projects for removing AI writing traces, covering both Chinese and English texts, including tools like qu-ai-wei and Humanizer, to help users write articles that sound more human.