[PR #782] [CLOSED] feat: add AI research agent with cross-provider adversarial fact-checking #13214

Closed
opened 2026-06-21 05:43:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Shubhamsaboo/awesome-llm-apps/pull/782
Author: @WingedGuardian
Created: 5/6/2026
Status: Closed

Base: mainHead: feat/ai-research-fact-checker-v2


📝 Commits (2)

  • e8fa7ce feat: add AI research agent with cross-provider adversarial fact-checking
  • 0564af5 fix: address review feedback — dedup, config dataclass, system param, max_tokens

📊 Changes

5 files changed (+1021 additions, -0 deletions)

View changed files

advanced_ai_agents/single_agent_apps/ai_research_fact_checker/.gitignore (+4 -0)
advanced_ai_agents/single_agent_apps/ai_research_fact_checker/README.md (+133 -0)
advanced_ai_agents/single_agent_apps/ai_research_fact_checker/app.py (+330 -0)
advanced_ai_agents/single_agent_apps/ai_research_fact_checker/requirements.txt (+9 -0)
advanced_ai_agents/single_agent_apps/ai_research_fact_checker/research_agent.py (+545 -0)

📄 Description

Summary

Reworked version of #773, addressing all three review concerns:

Feedback Fix
"LLM suggests URLs — hallucinate frequently" Replaced with real DuckDuckGo search (ddgs package, no API key needed)
"fetch_url returns raw HTML with scripts/noise" newspaper4k for articles + BeautifulSoup fallback (strips scripts, nav, footers)
"Same model shares biases and knowledge gaps" OpenAI for research, Anthropic Claude for fact-check — different provider, different training data, genuinely independent

What changed vs. #773

  • Search: SEARCH_SYS prompt (LLM-generated URLs) → DDGS().text() (real web search)
  • Extraction: Raw r.textnewspaper4k article parser + BS4 HTML cleanup
  • Independence: Single gpt-4o-mini for everything → OpenAI research + Anthropic fact-check (both API keys required, no fallback mode)

Pipeline

Topic → Plan (OpenAI) → Search (DuckDuckGo) → Extract (newspaper4k) → Report (OpenAI) → Fact-Check (Anthropic Claude) → Verdict

How to run

pip install -r requirements.txt
export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...
streamlit run app.py

Or CLI: python research_agent.py "your topic"

Files

  • research_agent.py — Core pipeline + CLI (490 lines)
  • app.py — Streamlit web UI (250 lines)
  • requirements.txt — 8 dependencies
  • README.md — Full documentation with architecture diagram

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Shubhamsaboo/awesome-llm-apps/pull/782 **Author:** [@WingedGuardian](https://github.com/WingedGuardian) **Created:** 5/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/ai-research-fact-checker-v2` --- ### 📝 Commits (2) - [`e8fa7ce`](https://github.com/Shubhamsaboo/awesome-llm-apps/commit/e8fa7ce549dc2778ad8f1b8e666192d1483e319e) feat: add AI research agent with cross-provider adversarial fact-checking - [`0564af5`](https://github.com/Shubhamsaboo/awesome-llm-apps/commit/0564af5880abcc5738473d0f512b183327211acf) fix: address review feedback — dedup, config dataclass, system param, max_tokens ### 📊 Changes **5 files changed** (+1021 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `advanced_ai_agents/single_agent_apps/ai_research_fact_checker/.gitignore` (+4 -0) ➕ `advanced_ai_agents/single_agent_apps/ai_research_fact_checker/README.md` (+133 -0) ➕ `advanced_ai_agents/single_agent_apps/ai_research_fact_checker/app.py` (+330 -0) ➕ `advanced_ai_agents/single_agent_apps/ai_research_fact_checker/requirements.txt` (+9 -0) ➕ `advanced_ai_agents/single_agent_apps/ai_research_fact_checker/research_agent.py` (+545 -0) </details> ### 📄 Description ## Summary Reworked version of #773, addressing all three review concerns: | Feedback | Fix | |----------|-----| | "LLM suggests URLs — hallucinate frequently" | Replaced with real DuckDuckGo search (`ddgs` package, no API key needed) | | "`fetch_url` returns raw HTML with scripts/noise" | newspaper4k for articles + BeautifulSoup fallback (strips scripts, nav, footers) | | "Same model shares biases and knowledge gaps" | **OpenAI for research, Anthropic Claude for fact-check** — different provider, different training data, genuinely independent | ### What changed vs. #773 - **Search**: `SEARCH_SYS` prompt (LLM-generated URLs) → `DDGS().text()` (real web search) - **Extraction**: Raw `r.text` → `newspaper4k` article parser + BS4 HTML cleanup - **Independence**: Single `gpt-4o-mini` for everything → OpenAI research + Anthropic fact-check (both API keys required, no fallback mode) ### Pipeline ``` Topic → Plan (OpenAI) → Search (DuckDuckGo) → Extract (newspaper4k) → Report (OpenAI) → Fact-Check (Anthropic Claude) → Verdict ``` ### How to run ```bash pip install -r requirements.txt export OPENAI_API_KEY=sk-... export ANTHROPIC_API_KEY=sk-ant-... streamlit run app.py ``` Or CLI: `python research_agent.py "your topic"` ### Files - `research_agent.py` — Core pipeline + CLI (490 lines) - `app.py` — Streamlit web UI (250 lines) - `requirements.txt` — 8 dependencies - `README.md` — Full documentation with architecture diagram --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-21 05:43:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-llm-apps#13214