All articles
Guide
Implementation, cost and ROI7 min

A knowledge base for your AI agent: build it from chat history, price lists and your team's heads instead of writing it from scratch

When a company decides to launch a customer-facing AI agent, the first thing that stalls the project is rarely the model or the integrations. It is the question of where the agent's answers will come from. The usual response is to ask someone to "write the knowledge base". They open a blank document, a week later it holds five pages of generic statements, and the project stops. You almost never need to write from scratch. The answers already exist in your company: in customer chats, price lists, contracts, voice notes from your sales team and the memory of the people who have been there longest. This article covers how to inventory those sources, extract answers from them, resolve contradictions and keep the result from going stale a month after launch.

Why "write it from scratch" is the wrong brief

A blank page has two problems. First, the author writes what they think matters rather than what customers actually ask. You end up with a polished paragraph about the company's mission and nothing on whether payment can be split into instalments. Second, text written "for the knowledge base" drifts from how your team really answers. The agent says one thing, sales says another, and the customer gets two answers to the same question.

A better brief: collect what the company already tells customers, verify it and bring it into one format. That is an editor's job rather than an author's, and it moves much faster. It is also safer, because the agent learns from wording that real customers have already seen.

Inventory: where the answers already live

List every place your team pulls information from when answering a customer. Most businesses end up with six to eight sources.

SourceWhat it gives youThe riskWhat to do
Customer chats (WhatsApp, Instagram, Telegram, email)Real questions and the wording your team uses to answerOutdated prices, personal data, one-off deals with specific customersExport the last 3–6 months, anonymise, extract questions; verify every answer before reuse
Price lists and cataloguesRange, specifications, base pricesSeveral versions in circulation at oncePick one current version and make it the master
Sales scripts and reply templatesConversation structure and objection handlingOften written long ago and no longer how you sellCheck against chats: which parts are actually used
Contracts, terms, delivery and returns policyPrecise legal termsLanguage customers don't understand; risk of a loose paraphraseRewrite key points in plain language and keep a link to the source
Voice notes and call recordingsAnswers to complex questions nobody wrote downSlow to processTranscribe selectively, only for gaps the chats don't cover
Experienced staffExceptions, nuances, "how it really works"Undocumented and leaves with the personShort structured interviews (see below)

Mark separately where live data sits: stock levels, schedules, order status, free slots. Don't copy those into the knowledge base. The agent should read them directly from your ERP or CRM. The knowledge base is for things that change rarely: terms, rules, descriptions, procedures.

Mining your chat history

  1. Export. Take conversations from your main channels for the last three to six months. If there are thousands, a random sample of a few hundred is enough for the recurring questions to show up.
  2. Anonymise. Strip names, phone numbers, addresses and order numbers before passing the text to anyone, AI tools included. If you operate in the UK or EU, this is also where GDPR obligations start to matter. More on data handling in our piece on where your data is stored when you connect AI.
  3. Group the questions. AI is useful here: it quickly merges "how much is it", "what's the price" and "cost?" into one topic, including messages that mix languages.
  4. Sort by frequency. A small number of topics usually covers most of the volume. Start there.
  5. Pick the best answers. For each topic, find two or three replies from your team and choose the clearest. Resist the urge to polish it; natural wording often works better.

Contradictions: the most valuable finding

At this stage almost every project discovers that different sources say different things. One salesperson says delivery is free above a certain amount, another quotes a different threshold, and the price list has a third. The lead time in the contract differs from the reply template. Nobody made a mistake; nobody had ever put these sources side by side.

We ran into exactly this when building the knowledge base for our own ERP: half the procedures existed only in people's heads, and some figures contradicted each other across files. See the case study an ERP across four businesses. Digitising doesn't create these problems; it makes them visible.

An agent working from contradictory material will pick a version at random. Keep a simple discrepancy log — topic, version A, version B, where each appears, who decides — and work through it with a manager in one meeting. Record each decision in a single sentence.

Interviewing staff for what was never written down

"Tell us everything you know" doesn't work. A focused 30–40 minute session with specific questions does:

  • Which customer questions do you always pass to a manager or colleague, and why?
  • When do you answer differently from the price list or script?
  • What mistakes do new hires make in their first month?
  • What do you always tell customers even if they don't ask?

Answers to the first question are gold: they are a ready-made list of situations where the agent must stop and hand the conversation to a person.

The format the agent needs, and how to test it

The agent doesn't need a nicely designed document. It needs short, self-contained cards, one topic each: the topic phrased as a customer would ask it; a 2–6 sentence answer you could send almost as is; conditions and exceptions; when to hand over to a human; source and owner; date last checked. One topic per card — two questions in one card confuse retrieval. How agents search this kind of material is covered in our article on RAG systems.

Before launch, set aside 50–100 real questions from your chats that you didn't use while building, and run them through the agent. Every wrong or empty answer is either a gap or a badly written card. The same set later becomes your acceptance test, as described in our guide to writing a spec for an AI agent.

Keeping it current comes down to three rules: every card has a named owner; a new price list isn't live until the cards are updated; and once a week someone reviews the questions the agent couldn't answer. More on rollout in our implementation section.

FAQ

How much material do we need to launch?

Less than you think. Cards for the most frequent topics plus a list of hand-over situations is enough to start. The rest gets added as you see what the agent can't answer.

Can we just load our entire chat history into the agent?

We wouldn't. Chats contain outdated prices, one-off arrangements and personal data, and the agent will repeat them as if they were policy. Treat chat history as a source of questions and drafts, not a finished base.

Should we build it ourselves or hand it to a vendor?

A vendor can run the process, analyse the chats and prepare drafts. Only your company can resolve contradictions and confirm facts — nobody outside knows which of two prices is correct.

We serve customers in several languages. Do we need a base per language?

Keep one source of truth for facts such as prices, lead times and terms. The agent can answer in the customer's language from a single card, which stops the language versions drifting apart.

If you'd like to look at what material you already have and what it could become, get in touch. The first conversation is about understanding the scope and your data.

Subscribe to AI Insights

Case studies, tips and AI automation trends — weekly

Want similar results?

Get a free consultation and ROI calculation for your company

Free Consultation

Related Articles

Guide

Customer Consent to Data Processing When an AI Agent Is the One Replying

The customer is messaging a bot, not a person — but the requirement to get consent for data processing does not disappear. Here is when to ask for it, how to set it up across channels, and what to log.

Guide

AI on your own server: when you genuinely need it, and when it only feels that way

"It's safer" isn't an answer. We separate the checkable reasons for self-hosting AI from the outdated fear driving most of these decisions.

Guide

Open-weight models or a commercial API: which one your business should run on, and when self-hosting pays off

"Host the model ourselves and it's free and private" sounds right until you price the GPU, the engineer and the quality gap. Three options and the criteria that decide between them.

Guide

The system prompt behind your AI agent: what it is and who should write it

A system prompt isn't a knowledge base or a spec — it's the agent's behaviour rules: tone, decision limits, escalation triggers. Here's what goes into one and who should own it.

Guide

Support after launch: what happens to your AI agent a month in

Launch isn't the finish line — it's the start of a different job. Here's what usually happens to an agent in its first month: where it starts drifting, who should notice, and what a weekly review should look like.

Guide

After the pilot: how to scale your AI agent to other departments without repeating the same mistakes

A successful pilot in one department doesn't mean the rest of the company is ready for the same agent. How to choose the next department and what to re-check each time.

AI agent knowledge base: build it from what you already have | UNIKA