Skip to content

TheRavi/trinetra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trinetra 👁

The third eye for fact-checking. Sees past surface claims, traces every verdict to its source.

Trinetra (Sanskrit: त्रिनेत्र) is the epithet of Shiva, whose third eye sees beyond surface appearance and burns through illusion. This project borrows the name for an agent that does the same with factual claims — examining each one, gathering evidence from across the web, and producing a verdict that always shows its work.

Trinetra does not deliver opinions. It produces an evidence map: for every claim, the sources it found, what each source said, whether the source supported or contradicted the claim, and an honest verdict that distinguishes supported, contradicted, contested, and unverifiable.

Why another fact-checker?

Most existing tools either:

  • give a binary "true / false" verdict and ask you to trust them, or
  • target marketers and SEO rather than people who care about getting claims right.

Trinetra is built around two principles:

  1. Claims atlas, not verdicts. The output is a structured map of every claim and its evidence. You, the reader, are still the judge.
  2. Show your work. Every verdict is traceable to specific URLs and what those URLs said. No invented sources, no black-box scoring.

Status

This is a learning project, built incrementally.

  • Phase 1 — Single-claim agent with web search and structured verdict.
  • Phase 2 — Claim extraction: paste a paragraph, get an atlas of every claim.
  • Phase 3 — Full-page evidence reading (not just search snippets).
  • Phase 4 — Active counter-evidence search; better handling of contested claims.
  • Phase 5 — Evaluation harness with labeled test claims.
  • Phase 6 — Multi-agent: Extractor + parallel Researchers + Critic.

You are currently looking at Phase 1: one claim in, one verdict out.

Setup

git clone https://github.com/TheRavi/trinetra trinetra
cd trinetra
python -m venv venv
source venv/bin/activate          # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env              # then fill in your API keys

You'll need two free API keys:

Usage

python trinetra.py "The Great Wall of China is visible from space."

Sample output:

👁  Trinetra is examining: 'The Great Wall of China is visible from space.'

--- Step 1 ---
  🔍 search: great wall of china visible from space
     → 5 results
--- Step 2 ---
  ✅ verdict produced
============================================================
{
  "claim": "The Great Wall of China is visible from space.",
  "verdict": "contradicted",
  "confidence": "high",
  "reasoning": "Authoritative sources including NASA report that the Great Wall is not visible to the unaided eye from low Earth orbit. The claim is a long-standing myth that predates spaceflight.",
  "evidence": [
    {
      "source_url": "https://www.nasa.gov/...",
      "source_title": "NASA — China's Wall Less Great in View from Space",
      "supports": false,
      "quote_or_summary": "NASA states the Great Wall is not readily visible from low Earth orbit without optical aid."
    }
  ]
}

Try a few different kinds of claims to feel how Trinetra behaves:

  • A clear fact: "Python was created by Guido van Rossum."
  • A common myth: "You only use 10% of your brain."
  • A prediction: "AI will replace half of all jobs by 2030."
  • A contested claim: "Coffee is good for you."

Architecture (Phase 1)

           ┌─────────────────────────────────────┐
           │           Gemini (Trinetra)         │
           │  decides: search again or conclude  │
           └──────────────┬──────────────────────┘
                          │
             tool call?   │   no tool call?
               ┌──────────┴──────────┐
               ▼                     ▼
       ┌──────────────┐      ┌────────────────┐
       │ tavily_search│      │ parse verdict  │
       │  (web API)   │      │  → return JSON │
       └──────┬───────┘      └────────────────┘
              │
       results feed back into the loop

The agent loop is roughly 40 lines in trinetra.py. There is no framework — every part of the agent lives in one file and you can read it end to end.

Project layout

trinetra/
├── trinetra.py         # the agent
├── README.md           # this file
├── .env.example        # template for API keys
├── .gitignore
├── requirements.txt
└── LICENSE             # MIT

Roadmap notes

Phase 2 will move from "one claim at a time" to "a paragraph at a time": Trinetra will extract every factual claim from a piece of writing and run a verdict pass on each, producing the full claims atlas. Later phases add real page-reading (instead of trusting search snippets), active hunting for counter-evidence, an eval harness with labeled claims, and a multi-agent split where extraction, research, and critique each become their own agent.

License

MIT. Use it, fork it, ship it, learn from it.


The name is taken with respect for the tradition it comes from.

About

Trinetra - the third eye for fact-checking.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages