An assistant that answers from your own documentation and does not make things up
A chat that answers questions from customers or your team using only your manuals, policies and catalogs, and says "I don't know" when the answer is not there.
- Level
- Developer
- Requires integrating the API into your own system.
- Time
- One week for a version you can show
- Published
What it costs
This is the most expensive recipe in the cookbook: days of development, a vector database (there are free options for small volumes) and API usage for every question. Before building it, exhaust the simple route: a claude.ai Project with your documents uploaded solves a large part of the case without programming.
guided mode // I ask, you answer
ready to start
Do it with me, step by step
I will ask you 1 question about your business, use your answers to get the prompt ready to copy, and then walk you through the 5 steps, one at a time. Like a Thermomix: you just answer and move on.
Who it is for
Companies with extensive manuals, policies, catalogs or FAQs, where the team answers the same thing many times by searching through documents.
The problem
The correct answers exist, but they are scattered across PDFs, old emails and the heads of two people. A generic chatbot confidently answers things that are not about your company. And the real fear is that it invents a return policy that does not exist.
What changes
The assistant searches your documents first, answers citing where it got each fact, and when it finds nothing it says so instead of improvising. The team stops answering repeat questions and the customer gets the official answer, not an approximation.
Ingredients
- Your documents as text: manuals, policies, catalog, FAQs
- A database with similarity search (vectors), or the provider's equivalent service
- API access to a model
- A process to update the documents when they change, or the assistant goes stale
Step by step
- 1
Gather and clean the documents
Convert everything to plain text or Markdown. Remove old and duplicate versions: if two documents contradict each other, the assistant will contradict itself too. This step is 60% of the work and nobody wants to do it.
- 2
Split into fragments with context
Divide each document into chunks of 300 to 800 words. Prepend to each chunk a line saying which document and section it comes from. Anthropic measured that this added context reduces retrieval failures by 49%; it is the technique the source calls "contextual retrieval".
- 3
Store the fragments in a database with semantic search
Each user question retrieves the 5 to 10 most similar fragments. Those fragments, and only those, are what the model can use to answer.
- 4
Write the prompt that forces citations and admitting gaps
Use the prompt below. The key rule is the "I don't know" rule: without it, the model fills in with general knowledge, and that is where invented policies come from.
- 5
Test with the 30 most frequent real questions
Pull them from your emails or WhatsApp. Note how many it answers correctly, how many it correctly says it does not know, and how many it makes up. The made-up ones are the only serious ones; adjust until they are zero.
The prompt
Replace what is in brackets with your company details, or use the guided mode above: it asks you and fills it in for you.
You are the assistant for [COMPANY NAME]. You answer customer questions using ONLY the information that appears in the reference documents I give you below. Strict rules: 1. If the answer is in the documents, answer it clearly and finish by indicating which document you took it from, in square brackets: [SOURCE: DOCUMENT NAME]. 2. If the answer is NOT in the documents, reply exactly: "I don't have that information in the official documentation. I'll pass you to the team to confirm it." Do not fill in with general knowledge or assume. 3. If the documents contradict each other, say so and show both versions. 4. Never invent prices, deadlines, policies or conditions. 5. Reply in Chilean Spanish, in a warm and direct tone, 120 words maximum. Reference documents: [RETRIEVED FRAGMENTS ARE INSERTED HERE AUTOMATICALLY] Customer question: [QUESTION]
What usually goes wrong
- ✕Skipping the document cleanup. An assistant built on contradictory documents is worse than no assistant.
- ✕Fragments without context. A chunk that says "the deadline is 10 days" without saying what it is about is useless for search.
- ✕Measuring only the correct answers. What you need to bring to zero is the made-up answers, even if that means more "I don't know".
When not to use this recipe
If your documents fit in a single claude.ai or ChatGPT Project (dozens of pages, not thousands), do not build anything: upload the files there and use the same prompt. Custom RAG is justified with thousands of pages, frequent updates or integration with your own system.
Source and real case
Support and internal knowledge
The 49% reduction in retrieval failures comes from Anthropic's original article on contextual retrieval, measured on its own test sets.
Technical article with metrics:Contextual Retrieval in AI Systems · Anthropic
Also:Customer support agent — Claude Platform Docs
Last verified:Based on Anthropic's contextual retrieval article and its support agent guide. The 49% figure comes from the source, not from an OlaDigital measurement.
Share it
If someone on your team could use this recipe, send it in one click. The suggested text copies itself.
Want to apply it in your business? Message Cristián directly.
Telegram