A chatbot is only as good as the documents behind it. This console lets a non-technical admin edit the library, test any question against it, tune the ranking and see which questions go unanswered.

Open Documents and edit a passage, or add a new document. In the Retrieval lab, type a question and see which terms were used and which passages rank first. Change the minimum match score in Tuning and watch the lab verdict flip between answered and declined. Insights shows example data. Everything runs in your browser and nothing is sent anywhere.
When a chatbot gives a poor answer, the cause is usually that the right passage was missing, split badly or ranked too low. The admin console makes each of those visible: the text of every document, how it is split into passages, and how a question ranks them.
It pairs with the chatbot through a workspace file. An admin edits documents and settings here, exports the workspace, and the chatbot imports it, so the knowledge base can be updated without touching code.
Fix the library, not the prompt.
Create, edit, upload (.txt or .md), switch off or delete documents. Headings in the text become sections, and each document shows its word and passage counts.
Test any question. See the cleaned search terms, how rare each one is, the ranked passages with scores and a verdict on whether it would be answered.
Passage size and overlap, how many passages to use, the ranking weights and the minimum match score, with a plain-language note on each.
Questions per day, answered versus declined, average best match, content gaps and most cited documents.
Documents, settings and the question log move between the chatbot and this console as one JSON file.
One button restores the sample library, so it is safe to experiment.
Select any screen to view it full size.
The lab lists every search term with its weight and the passages it matched, so a bad result can be diagnosed in seconds.
Declined questions are grouped as content gaps. The next document to write is the one people already asked for.
Edits stay on the device until exported, and one click restores the sample library.
Each setting says what it changes and what happens when it goes too high or too low.
In the demo: document editing and upload, passage splitting, the retrieval lab, all six tuning settings, the insights page and workspace export and import, all on the same BM25 engine as the chatbot.
Not yet: a login, a server, shared editing and version history. The page warns that anyone with the link can open it, so a login is needed before real use. The Insights figures include labelled example data.
Part of the Adhikar project: see Adhikar Desk →
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.
Upload documents or paste text. Each carries a category, language, owner and review date.
A reviewer checks new and changed documents. Only approved versions are indexed.
Run real questions in the retrieval lab and see which passages rank first and whether the system would answer.
Adjust passage size, number of passages and the minimum score, then re-run the fixed test set to check nothing got worse.
Publishing creates a version. If answers get worse, one click returns to the previous version.
Insights lists declined questions and the most cited documents, so the next document to write is the one people already asked for.
No document reaches citizens without a reviewer’s sign-off.
Every change is recorded with who made it and when, and can be reversed.
Documents past their review date are flagged before they go out of date.
Uploads, edits, setting changes and publishes are logged for compliance.
Editing, approving and viewing are separate permissions.
A fixed set of questions runs on every change and blocks releases that make answers worse.
See how the chatbot side works in production on Adhikar Desk → To scope a build, 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.
Document management, retrieval testing and analytics are a focused build. Tell us how your team works and we’ll scope it.