RAG development: an AI assistant over your own documents
I do RAG development for teams whose answers already exist in writing but take too long to find. The result is a document Q&A chatbot that answers from your handbook, contracts or knowledge base, links each answer to the passage it came from, and says so when your documents do not cover the question.
RAG means retrieval-augmented generation: the assistant looks up the relevant passages first and answers only from them. What you pay for is making that reliable, and proving it with numbers.
- Starts at
- €4,000 for one document set
- Typical length
- 3 to 6 weeks
- Every answer
- Cited to its source passage, or a plain refusal
- You keep
- The code, the question set that measures it, documentation and a handover session
audience
Who this is for
Teams where the answer is on file somewhere and people still lose time finding it.
- Staff answer the same policy questions from a 200-page handbook, week after week, and each answer depends on who remembers the right section.
- A salesperson searches a shared drive of old proposals and product sheets for the one paragraph a customer asked about.
- New starters cannot tell which of three versions of a procedure is the current one.
- Clients or partners email questions that your own FAQ and contracts already answer.
deliverables
What you get
An assistant over a defined set of documents
PDF, Word, web pages, Markdown and plain text, plus other formats when the text can be extracted reliably, which I check in week one. You get a simple web chat, or the same assistant as an API that your own site or tools can call.
Documents split along their own structure
Cutting a document every thousand characters separates a clause from its heading and a rule from its exception. I split on the structure your documents already have: sections, clauses, numbered points. Each piece keeps its heading and the label you would cite.
Cited answers, or a refusal
Every sentence in an answer cites a passage, and each citation links to the original. After the model answers, code checks that every cited passage was actually retrieved. If the documents do not support an answer, the assistant says so instead of guessing.
A question set that measures it
Before building, we write 30 to 40 of your real questions and mark which passages answer each one. After every change I re-run them and report the score. That is how we decide whether a change helped, and how you know the assistant has not got worse when your documents or the model change.
Logging and cost limits
Every question is logged with the passages retrieved and the outcome, so a wrong answer can be traced. Questions that match nothing in your documents are refused before any paid model call. A public assistant gets spend caps per session and per visitor address.
Tests, documentation and a handover
Automated tests, the question set and the script that runs it, a written guide to re-indexing when your documents change, and a handover session for the people who will own it.
schedule
How it runs
Before anything is agreed
Brief and sample documents
You send a brief and a representative handful of documents. I reply within two working days with whether RAG is the right tool, a rough scope and a price range.
Your part A few documents exactly as they are, scans and all, and what people ask about them.
Week 1
The question set
We write 30 to 40 real questions and mark the passages that answer each one. I check how well your documents can be read and cut up, then give you a fixed price. From here on, success is a number we can both see.
Your part Someone who knows the answers confirms the labels. Plan on a few hours.
Weeks 1 to 3
Retrieval first
I process the documents, build the search and score it against the question set before any answer is generated. If the right passage is not found, no wording can rescue the answer. I try the alternatives and keep what the score supports.
Your part Answer my questions about odd documents.
Weeks 3 to 5
Answers, citations and refusals
I add the answering step with its citation checks and refusals, then re-score. Every failure becomes a new question in the set.
Your part Read the answers, especially the refusals, and tell me which should not have been refused.
Weeks 5 to 6
Your staff try it, then handover
People use it on real questions, and what fails goes into the question set. Then the handover: the code in your repository, the documentation, and a session for the people who will own it.
Your part A handful of staff who ask real questions.
limits
What I will not do, and when RAG is the wrong tool
- I will not make it answer everything. It refuses when your documents do not support an answer. A refusal is the correct result in that case, not a bug.
- I cannot promise every answer is right. The citation check proves the cited passage was retrieved, not that the sentence says what the passage says. My EU AI Act assistant has this limit and its README says so. Where a wrong answer is costly, add a human review step, or ask me to scope a second-model check.
- I will not index documents that contradict each other without a rule for which one wins. The assistant can only quote both.
- It is the wrong tool for a short document or for live data. Twenty pages can be pasted into a chat tool. An answer that lives in a database or a spreadsheet that changes daily needs a query or an agent, not document search.
- I will not dress up its output as professional advice. If the public will read it, it needs a visible disclaimer and a review process. The README of my EU AI Act assistant says plainly: “Not legal advice.”
evidence
Proof from my own document assistant
The evidence above comes from an assistant I built myself over the EU AI Act, to show how I work. It is a portfolio project, not a client engagement. Read the case study or browse the code on GitHub.
Here is the kind of result the question set exists to produce. I added keyword search to vector search, to help with exact legal terms and plain-language questions. On 36 hand-labelled questions it made the top five results worse and changed nothing at depth 20.
0.86recall@5
Vector search only.
source: 36 hand-labelled questions
0.58recall@5
Vector plus keyword search, the version I shipped.
source: 36 hand-labelled questions
0.92recall@20
Both versions score the same at depth 20.
source: 36 hand-labelled questions
recall@k is the share of questions where a correct passage appears among the top k results.
I wrote the cost down instead of tuning weights until the number looked better; the reasoning is in the case study. On your documents the answer may be different, which is why the question set comes before the build.
The follow-up step, which turns “and for small companies?” into a standalone question, lifts recall@5 on follow-up questions from 0.55 as typed to 0.73. Questions written standalone by hand score 1.00.
price
What it costs
from
€4,000
for one document set, at a fixed price for a scope we write down first.
what pushes the price up
- How many documents there are, and how messy: scans, tables and mixed formats cost more than clean text.
- Several sources, or syncing with a live one such as a shared drive, wiki or SharePoint.
- Different people seeing different documents.
- More than one language.
- Putting the assistant inside your site or chat tool, rather than a standalone web chat.
- Higher stakes: a review step, or a second-model check of the answers.
Model usage is billed to your own provider account, with spend caps set in code. I estimate it before we start.
Questions people ask
What does a document Q&A chatbot cost?
Building one starts at €4,000 for one document set, at a fixed price once the scope is written down. Running it costs model usage, billed to your own provider account. My EU AI Act assistant costs about $0.01 an answer, and building its search index from the whole regulation cost about $0.003. Your figure depends on the model, how long the answers are and how many passages go into each one. I estimate it from your expected volume before we start.
Where do our documents go?
During the build I work from copies you give me, under whatever confidentiality terms you need, including an NDA. After launch, the searchable index lives wherever the code is hosted, normally in your own account. Each question sends the question and the few retrieved passages to the model provider’s API, not the whole document set. Check the current API terms of the provider we choose; I link the exact page in the proposal.
If your documents may not leave your own network, tell me in the brief. That changes the design and the price, and may mean a self-hosted model, which is usually less capable.
Which AI models do you use?
Two kinds: an embedding model, which turns text into something searchable, and a chat model, which writes the answer. My own assistant uses OpenAI’s. Model names are settings, so changing provider means changing configuration and re-running the question set. A new embedding model also means re-indexing, which for a corpus the size of mine cost about $0.003.
Can it be wrong?
Yes. The citation check catches invented sources and uncited sentences. It cannot catch a real citation attached to a sentence that misreads the passage. That is why every answer links to its source, why I report the score on your own questions, and why a high-stakes use needs a human review step.
What happens when our documents change?
I deliver a script and a written guide for re-indexing, so an updated handbook does not need me. After a change, re-running the question set shows whether anything got worse. Syncing automatically from a drive, wiki or SharePoint is possible, and it raises the price.
Who owns the code?
You do. The code, the question set and the index live in a repository you own, and open-source libraries I use keep their own licences. I may reuse general techniques on other work, never your documents or data.
What happens after handover?
Your team can run and update the assistant from the documentation and the handover session. I fix defects in what I built for 30 days after handover at no charge. After that you can look after it yourselves, hire me for a one-off change, or take a retainer, from €1,800 a month, to watch refusals and spend and re-run the question set.
How long does it take?
Typically 3 to 6 weeks for one document set. Clean documents and quick answers on the question labels put you at the short end. Scanned PDFs, several sources or many document versions push you towards the long end.
Tell me which questions your team keeps answering by hand.
Send a short brief: what the work is, who does it now, and what it costs you. I reply within two working days with a rough scope, a price range and whether AI is the right tool for it at all.
Send a briefOr write to keel.agents@gmail.com.