How to prepare a knowledge base
Knowledge is the agent's fuel. The best model will not answer accurately from an outdated, chaotic archive. But it will answer very well from a few dozen well-written documents.
How well agents perform depends largely on the quality of the knowledge they work with. With every question, the RAG (Retrieval-Augmented Generation) mechanism searches the base for the most relevant document fragments, and the model builds its answer from them. The model does not "read" the whole base. It gets a handful of fragments. That is why how you write your documents decides which fragments reach the model.
| Type of knowledge | Description | Sources | Where in X-TALK |
|---|---|---|---|
| Public | Information for everyone | Website, FAQ, terms and conditions, price lists | Website crawl, files |
| Process | Procedures and operating rules | Instructions, SOPs, workflows | Files, SharePoint |
| Operational | Data that changes all the time | CRM, ERP, online store, calendar | Tools, not files |
| Expert | The team's know-how | Human agents' experience, notes | Texts in the panel, documents |
An X-TALK agent uses files (PDF, DOCX, TXT, CSV, spreadsheets, HTML, Markdown), websites (single addresses or an automatic crawl of the whole site), SharePoint libraries, short texts typed into the panel ("this week the hotline is open until 15:00"), and even images from documents, which it can show in its answer. Data that changes all the time, such as stock levels, appointment slots and statuses, is connected through integrations, not uploaded as a file.
Split documents by problem, not by department
One large document with all of the company's know-how is the worst thing you can do. Fragments from different topics get mixed up, accuracy drops, and updating one procedure means editing a 200-page PDF.
"Everything about customer service.pdf": 200 pages
- search returns fragments from different topics
- the model gets noise instead of an answer
- hard to update a single procedure
- higher cost, more text in the context
"Product return procedure", "Complaint: damage in transit", "Changing the delivery address", "Order status: FAQ"
- each document 1-3 pages, one topic
- search hits precisely
- you update one file
- shorter context = faster and cheaper
Drop the "keyword → answer" style
Many companies that used IVR or older chatbots keep their knowledge as terse keyword entries. Those systems matched keywords. Semantic search works differently: it turns text into meaning vectors and looks for similarity of meaning. A short keyword with no context is noise to it: "return" could mean returning a product, a refund, a tax return or a returned parcel.
Q: return
A: Returns are processed within 14 days.
Q: how to return
A: Send the return form to…
Q: money for return
A: Refund within 5-7 working days.
Customer: "I bought shoes a week ago, they're too small, what can I do?" → no match.
# Product return procedure
The customer wants to return a purchased product,
e.g. because of the wrong size, a mismatch
with the description or a change of mind. A return
is possible within 14 days of receipt…
[+ steps, exceptions, refund]
The same question: "shoes too small" = "wrong size" = "product return". A match.
If you are migrating from an old system, do not move keyword entries over 1:1. Group 20 entries on returns, complaints and exchanges into 3-4 full procedure documents with a description of the problem, conditions, steps and exceptions.
Metadata that really improves accuracy
Markdown documents in X-TALK can start with a YAML header (front matter). The knowledge engine uses it to boost results: a document whose keywords or symptoms match the customer's question gets a higher score.
---
procedure_id: PROC-014
priority: HIGH
category: ACCOUNT/LOGIN
summary: What to do when the customer cannot log in
keywords: [password, logging in, login, access, account locked]
symptoms: [I can't log in, I forgot my password, my account is locked]
tags: [account, security]
stt_hints: [PIN, token, Authenticator]
required_questions:
- Which e-mail address is the account registered to?
- Do you see a message saying the account is locked?
---
# Problem logging in to the account
## Problem description
…
## Resolution steps
1. …
## When to hand over to a human agent
…
| Field | What it is for |
|---|---|
keywords |
Keywords and synonyms, including colloquial ones and ones in other languages, strengthen matching |
symptoms |
Symptoms described in the customer's words ("login doesn't work"), a strong matching signal |
priority |
CRITICAL, HIGH, NORMAL, LOW; favours critical procedures (outages, security) |
category, tags |
Order in the base, filtering, analysis |
summary |
A short description of the document, a results preview and better matching |
required_questions |
New: questions the agent must ask (and get answered) before it walks the customer through the procedure |
stt_hints |
New: names and abbreviations the agent should hear correctly in a voice conversation |
Keeping knowledge current and healthy
Knowledge is alive. In X-TALK, websites and SharePoint refresh automatically on a schedule, and the panel shows the health of the base: unavailable sources, documents with processing problems, documents nobody uses. The document preview shows what text actually went into the base, for example whether a table from a PDF was read correctly. And hotspots (chapter 20) give you a ready list of questions the agent could not answer.
When syncing with sources such as SharePoint, remember that updating a document is not just "swapping a file": the text is extracted again, split into fragments and indexed. The cost is small, but with thousands of frequently changed files it is worth planning a schedule (e.g. once a day instead of in real time).
Ready for the next step?
Describe your company in the free Copilot on x-talk.me. In a few minutes you will see your own agent in chat and on the phone. Or let's talk about what an AI communication centre could look like in your company.
+48 732 106 896 · x-talk.me