Tathagat Agrawal

Anuchhed: citation-first Q&A over the Constitution of India

Ask anything about the Constitution of India and every statement in the answer cites the exact Article, clause or amendment it comes from, with quotes verified against the official text.

November 2026 · In progress · Source on GitHub

Result: On a 70-question development set, 97% of answers behaved correctly (against 87% when the same model answered from memory and 71% for naive RAG), and every quote shown matched the official text exactly.

The problem

General-purpose chatbots answer legal questions fluently but cite loosely or not at all. For a constitution, a wrong Article number, a repealed provision presented as current, or a paraphrase passed off as a quote is worse than no answer. Anuchhed answers questions about the Constitution of India so that every statement can be checked against the official text.

What I built

The Anuchhed answer page. A question about whether education is a fundamental right is answered in a short cited paragraph, with a badge reading 1 of 1 statements checked against the official text. A side panel shows Article 21A with its amendment history and the matching words highlighted.
Figure 1. An answer to "Is education a fundamental right?". Each citation opens the official text with the quoted words highlighted, and the badge reports how many statements were checked against it.

Results so far

Deterministic reference lookup is the largest single retrieval gain for every search method:

Retrieval configuration Recall@5 MRR
BM25 0.787 0.733
Lookup + BM25 0.897 0.784
Dense embeddings 0.843 0.765
Lookup + dense 0.963 0.871
Hybrid (lookup + BM25 + dense) 0.937 0.872
Lookup + dense + reranker 0.957 0.868

Whole answers, compared with the same model answering from memory and with a naive RAG baseline:

System Right behaviour Key facts Citation recall Quotes exact
Anuchhed 97% 95% 95% 100%
Same model, no retrieval 87% 89% 87% 64%
Naive RAG (embedding search, plain prompt) 71% 78% 78% 70%

Answering from memory is a strong baseline on well-known questions, but it fails exactly where retrieval matters: it doesn’t know the 106th Amendment came into force in April 2026, and only 64% of its quotes match the official text.

Status and limits

Ingestion, retrieval and verified answers work end to end, including follow-up questions. The numbers above come from a development set of 70 questions that I drafted with an AI assistant and have not yet reviewed against the text, so they are indicative rather than final. A locked test set of about 250 questions and the deployment come next.

Independent educational project. Not legal advice.

Built with

Retrieval-augmented generation, Embeddings and vector search, LLM and agent evaluation, LangGraph, LLM APIs (Gemini, OpenAI, OpenRouter), Prompt engineering, Web APIs with FastAPI, SQL databases (PostgreSQL, SQLite), Web front ends (HTML, CSS, JavaScript), Python