A chatbot for questions about Indian citizen rights, such as RTI, consumer complaints, privacy and fundamental rights. It answers only from a document library, shows the passages behind every answer, and says so when the library does not cover the question.

Pick one of the example questions, or ask your own about RTI, consumer complaints, personal data or the Constitution. Open Show passages under an answer to see exactly which text it came from. Then try something the library does not cover, such as a trademark question, and watch it decline. The admin pages are in the sidebar. Everything runs in your browser and nothing is sent anywhere.
People asking about their rights need to know where an answer came from. Adhikar Desk is built around that. A question is matched against a library of short document summaries, the best passages are ranked, and the answer is built from them, with a numbered citation on each claim.
If nothing in the library is a good enough match, it says so instead of guessing: “The library does not cover this.” A confidence threshold, set by the admin, decides when that happens, and every declined question is logged so the library can grow where people actually ask.
If it cannot show the passage, it does not answer.
Each sentence carries a number that links to the passage it came from, so a reader can verify it in one click.
The passages behind an answer are listed with the document, the section, a relevance score and the matched words highlighted.
Below a minimum match score, it declines and tells the user to rephrase or ask an admin to add a document.
A short follow-up such as “and what about appeals?” is read together with the previous question.
Documents, a Retrieval lab, Tuning and Insights sit in the same app, so the library can be managed where it is used.
The layout collapses to a single column with a menu, and the sample questions stay one tap away.
Select any screen to view it full size.
Every answer is built from retrieved text and cites it. A good-sounding answer with no passage behind it is treated as a failure.
A minimum match score makes “not covered” a normal outcome. Those questions are logged as content gaps.
The Retrieval lab shows each search term, how rare it is, and why a passage ranked where it did, so tuning is evidence-based.
Documents are plain text with headings. An admin edits them, exports the workspace and the chatbot publishes the change.
In the demo: BM25 ranking with stemming and stop words, passage splitting, citations, a minimum score, follow-up handling, document editing and upload, tuning, a question log and a workspace export and import. On this site the demo runs retrieval and extractive answers: it quotes the best matching sentences from the library. Inside Claude, the same app can have Claude write the answer from the retrieved passages. It gives general information from summaries of public law, not legal advice.
Not yet: a server, user accounts, a large or verified legal library, and a search by meaning. The sample covers five short summaries. The Insights figures include labelled example data. Treat the answers as a demonstration of the method, not as legal information to rely on.
Part of the Adhikar project: see Adhikar Admin →
The demo keeps everything in the browser: no server, no API key and no outside requests. That makes every score explainable, and it is why there is no vector database here. The trade-off is that keyword search matches words, not meaning, so a question phrased differently from the document can miss. A production system fixes that with embeddings.
Documents are cut at headings into passages of about 80 words with a sentence of overlap.
Lowercase, remove stop words, stem. “Requests” and “request” become the same term.
BM25 scores each passage. Rare words count more, and very long passages are not favoured.
Below a minimum score the app declines. Otherwise it keeps the top 4 passages.
Extractive: quote the best sentences. Inside Claude: hand the passages to Claude to write a cited answer.
Upload PDFs and files, extract text, chunk with a proper splitter and keep metadata such as document, section and date.
Create an embedding for each passage and store it in a vector database (pgvector, Qdrant or Pinecone), next to a keyword index.
Run keyword and vector search together, so exact terms and similar meanings both match, then merge the results.
A reranker model re-orders the top 20 passages and keeps the best 4, with the same decline threshold.
An LLM answers only from those passages, with citations, through a backend API that keeps keys and data off the browser.
Both versions share the parts that make answers trustworthy: passage-level citations, a decline rule for questions the library does not cover, and a log of those questions so the library grows where people actually ask.
This section is a design for a production system. It is not built into the live demo above.
An admin uploads Acts, guides, FAQs and circulars, each with a title, category, language and review date. A qualified reviewer approves a document before it goes live.
Text is extracted (with OCR for scanned pages), split by headings into passages and stored with its metadata. Each passage is indexed for exact words and for meaning.
“My landlord won’t return my deposit.” The question arrives on the website or a messaging channel, in the citizen’s own language.
Keyword and meaning-based search run together, so “Section 6” and “security money” both match. A reranker picks the best 3 or 4 of the top 20.
Below a relevance threshold the system declines and offers a human contact. Otherwise a language model writes a short answer from those passages only, with a citation on every claim.
Declined questions become content gaps. An admin adds or fixes a document, re-runs a fixed test set and publishes.
The model may use the retrieved passages and nothing else. If they do not contain the answer, it must say so.
The reader can open the exact passage, its document and its review date.
Below a minimum relevance score the system declines and offers a human. The admin sets the threshold and tests it in the retrieval lab.
Before each release, 50 to 100 real questions with known correct passages run automatically. A change that makes any worse is blocked.
Every document shows when it was last checked, and overdue documents are flagged to the admin.
Questions are stored without names or contact details unless the user asks for a call-back. Access is by role and logged.
Asks questions, reads cited answers and can ask for a human.
Uploads and edits documents, tests questions and adjusts settings.
Approves documents before publishing and checks review dates.
Takes over questions the system declined or the citizen escalated.
Watches usage, answer rate and content gaps in Insights.
Owns the content. We build and run the system around it.
One topic area, one language, admin login, hybrid search and cited answers, tested on 50 real questions.
More topics and languages, human handover, an approval workflow and monitoring, with a support team behind it.
Messaging channels, analytics, automated test runs and tuning for volume and cost.
To scope it we need: the source documents and who owns them, a qualified reviewer, the languages, expected questions per day, who handles declined questions, any data-residency rules, and the channels (website, app or messaging). Running cost depends mainly on question volume and hosting. Tell us about your project →
Tell us a little about your idea. We will tell you honestly what it would take, how long it would take and what it would cost.
Retrieval chatbots for policies, products, support and compliance are a focused build. Tell us what the answers should come from and we’ll scope it.