In this lesson
Right base, right answer.
The agent answers with what it knows. What it knows about your company is what you wrote, and what it promises binds the company.
- Choose how to deliver the knowledge base and write short items
- Treat policy as a promise
- Write escalations and refusals with a ready answer
Why you need a knowledge base
The model knows what a store is and what an exchange is. It does not know your exchange deadline, does not know it changed in September and does not say where it got the answer. The knowledge base solves that. The technique is called RAG: before answering, the system searches the base for the right passage and pastes it in next to the question. The model answers by reading, not by remembering.
Three ways to deliver the base:
- Whole, in the instructions: for small bases, from 15 to 40 items.
- File search: for large catalogs and manuals.
- Tool: for data that changes all the time, such as stock.
The knowledge base item
The base is not the manual. It is the list of questions people ask, with the answer the company actually applies.
Policy is a promise
Article 30 of the Código de Defesa do Consumidor, Brazil's Consumer Protection Code, says that sufficiently precise information, given by any means, binds the supplier. That includes your agent's message. Each policy must have been approved by whoever answers for it. And the reply repeats the policy exactly: "it usually arrives in 3 days" is a promise of 3 days with one word of decoration.
"We sort it out case by case" is not a policy. If the owner wants to decide each case, the whole subject goes to escalation.
When the agent does not know
Anthropic recommends giving the model permission to say it does not know and removing any claim with no passage to support it. In practice: "I don't have that information, I'll check and get back to you". If the person insists, it holds its position.
Escalation
Each rule has a trigger, an action by the agent, a recipient with a name and a deadline to get back.
- Two attempts with no useful answer: it says it is passing the conversation to the support team, which replies within 30 minutes during business hours.
- Discount, exception, cancellation or refund: "that is for the manager to assess". It records and notifies. It never grants.
- Asked for a human: gets a human, no arguing.
A rule with no recipient escalates into the void. Before turning the agent on, trigger the rule with a test message and time the reply.
What the agent never says
- Someone else's data: neither confirm nor deny. Denying also reveals something.
- Clinical opinion: "That needs to be assessed in an appointment. Can I help you book one?"
- Promise of results: "every case is different".
- Asked whether it is a bot: "I'm the clinic's virtual assistant. If you prefer, I'll bring in someone from the team."
Scenario
Hypothetical: at a law firm, the agent told someone who asked about being dismissed from a job that they "probably" had a right to something. The person then books a consultation expecting a yes. The fix was a refusal with a ready answer.
What the pros know
The chunk loses its context. In file search, the system cuts the texts into small chunks. In 2024, Anthropic described the problem: a chunk can lose the context of where it came from. An example of our own: a chunk says only "the deadline is 7 calendar days", without saying the deadline for what. A search for "exchange deadline" does not find it. That is why people who build a knowledge base write each item to make sense on its own, with the subject in the first sentence, and test the search with customers' real questions.
Careful
Before turning the agent on, write down the policies that exist only in the team's heads. If a policy does not exist, the model fills the gap with something plausible, and the plausible can bind the company.
Practice · 10 min
- Write five knowledge base items, with question, an answer of up to three lines, source and date.
- Write the escalation rules with the name of who receives each one and the deadline the team actually meets.
- Write two refusals with a ready answer: someone else's data and the question about being a bot.
Summary
- A small base goes in whole; a large one, through search; live data, through a tool.
- A good item has a real question, a short answer, a source and a date.
- Policy is a promise, and it binds the company.
- Escalation has a trigger, an action, a recipient with a name and a deadline.
- Refusals have a ready answer, including for "are you a bot?".
Sources
Read on October 30, 2026.
- Anthropic. Contextual retrieval: chunks that lose their context.
- Anthropic. Reduce hallucinations.
- Brazil. Código de Defesa do Consumidor (Lei 8.078/1990): article 30.
- Meta. WhatsApp Business Messaging Policy.
- European Union. AI Act, article 50.
Lesson quiz
Three situations to apply what you learned.
Isaque Victor free courses