Skip to content

tsensei/GroundCrew

Repository files navigation

GroundCrew

GroundCrew

A sequential multi-agent fact-checking system that grounds claims in evidence. Built with LangGraph, OpenAI, and Tavily.

What It Does

GroundCrew automatically fact-checks text by:

  1. Extracting factual claims from input
  2. Searching for evidence via web search
  3. Verifying claims against evidence
  4. Reporting findings with confidence scores

Quick Start

# Install
poetry install

# Configure API keys
cp env.template .env
# Add your OpenAI and Tavily keys to .env

# Run with text
poetry shell
python main.py "Your text to fact-check"

# Or run with URL (requires FIRECRAWL_API_KEY)
python main.py --url https://example.com/article

Usage

Python API

from groundcrew.workflow import run_fact_check

result = run_fact_check(
    input_text="The Eiffel Tower is 330 meters tall.",
    openai_api_key="sk-...",
    tavily_api_key="tvly-..."
)

print(result.final_report)

CLI with URL Scraping

# Fact-check a web page
python main.py --url https://example.com/article

# With custom output and model
python main.py -u https://example.com/article -o report.md --model gpt-4

# Combine with Wikipedia-only mode
python main.py --url https://example.com/article --wikipedia-only

Documentation

Complete documentation is available in the wiki:

Features

  • ✅ Sequential 4-stage pipeline using LangGraph
  • ✅ Structured output with Pydantic validation
  • ✅ Type-safe throughout with full type hints
  • ✅ Real-time web search via Tavily
  • ✅ URL scraping with Firecrawl integration
  • ✅ Configurable quality presets
  • ✅ Comprehensive test coverage

Performance

Evaluated on FEVER dataset (100 samples, GPT-4o):

Configuration Overall SUPPORTS REFUTES NOT ENOUGH INFO
Web Search 71% 88% 82% 42%
Wikipedia-only 72% 91% 88% 36%

See evals/ for evaluation scripts and detailed results.

Technology Stack

  • LangGraph - Workflow orchestration
  • LangChain - LLM framework
  • OpenAI GPT - Language models
  • Tavily - Search API
  • Pydantic - Data validation
  • Poetry - Dependency management

Requirements

  • Python 3.12.6
  • OpenAI API key (get one)
  • Tavily API key (get one)
  • Firecrawl API key (get one) - optional, required for URL scraping

License

MIT License - see LICENSE file

Built With

Powered by modern AI tools: LangGraph, LangChain, OpenAI, and Tavily.

About

A team of agents that “ground” claims in sources

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published