Document Intelligence Assistant
An assistant that shows its sources.
A blueprint for a retrieval-augmented assistant that answers from internal documents, cites each passage and says so when it does not know.
A confident wrong answer is worse than no answer at all. Staff ask a colleague because search returns forty PDFs. A general chatbot would be faster, but it could invent a clause, surface a superseded policy, or show a document the reader has no right to see.
Who it is for
Professional firms, legal teams and other document-heavy organisations whose policies, proposals and precedents sit across years of shared drives, and where any answer someone relies on must trace back to its source.
- Consultants hunting for a precedent before a client call
- Knowledge managers who own the source documents
- Partners accountable for what the firm tells a client
What it sets out to do
- Answer in plain language from approved documents, with a citation for every claim.
- Say "I could not find this" instead of guessing.
- Respect the reader’s existing document permissions at retrieval time.
- Make answer quality measurable through a repeatable evaluation set, so changes can be compared.
46%
of developers actively distrust the accuracy of AI tools
Only 33% trust it, while 84% use or plan to use AI tools. Adoption has outrun confidence, which makes evaluation and human review the real work.
Source: Stack Overflow Developer Survey 2025 (opens in a new tab)The main screens
Drawn to show how each screen works, not captured from a live product.
Architecture
How the pieces fit
Each answer is a pipeline, not a single model call. Keeping the stages separate is what makes it possible to test retrieval on its own and swap the model later.
Python · PostgreSQL · Vector search · LLM APIs
- L1 Assistant interfaceChat with citationsSource previewFeedback controlA citation opens the exact passage, so checking an answer takes seconds.
- L2 Answer servicePython APIPrompt templatesRefusal rulesThe model is told to answer only from supplied passages, and refusal is an expected result.
- L3 RetrievalVector searchKeyword searchPermission filterCombining semantic and keyword search helps with client names and clause numbers.
- L4 Knowledge storePostgreSQLChunked passagesVersion metadataSuperseded documents stay stored but drop out of retrieval.
- L5 EvaluationQuestion setCitation checksRegression reportsThe same questions run on every change, and differences are reviewed by a person.
Build order
How we would build it
The evaluation set comes before the interface. Without it, every change to a prompt or a chunk size is an opinion.
Gather the questions
Build a set of real questions with known answers and known sources.
Cited answers
Every statement links back to a passage in the source document.
Honest refusal
When retrieval comes back weak, the assistant says so and suggests who to ask.
Permission-aware search
Readers only get answers from documents they could already open.
Version awareness
Current documents outrank older ones, and superseded material is labelled.
Answer feedback
A bad answer becomes a new item in the evaluation set.
More blueprints
All blueprintsWant an assistant your team can check?
Bring a few of your documents and the questions people ask about them. We will discuss what a grounded assistant could answer reliably, and what it should refuse.