Fine-tuning vs. knowledge base search: what is the difference
Many people think they need to "train a neural network on their data." Fine-tuning changes the model itself, is expensive and poorly suited to facts: prices change, and retraining a model every week is unreasonable. Besides, it can still confidently produce an inaccuracy.
A more practical scheme is different: documents are split into passages and stored in a special database. When a customer asks a question, the system finds the most relevant passages and passes them to the model along with the question. The model forms the answer only from that material. This approach is called retrieval-augmented generation.
How to prepare and connect documents
Gather materials
Price list, terms, instructions, sample contracts, service descriptions, managers' answers to frequent questions. Remove anything outdated.
Put things in order
One fact, one place. Contradictions between documents lead to contradictory answers.
Structure it
Prices are better stored in a table, not in an image. The assistant cannot read scans without text recognition.
Upload to the knowledge base
Documents are split into passages and indexed. The source and date are saved for each.
Set the answering rules
Answer only from the materials found, cite the source, and honestly say so when there is no data.
Test on real questions
Take 30–50 customer questions and compare the answers with the correct ones. Fix the materials where an answer is wrong.
What makes answers more accurate
- Up-to-date documents with dates and versions
- Short, specific wording instead of promotional copy
- Questions and answers written in your customers' language
- Separate documents for different services, not one big file
- Explicit limits: "we give no guarantees," "the price depends on..."
- Handing the dialogue to a human if answer confidence is low
Decide which documents must not be uploaded
Contracts with specific customers, personal data and internal financial reports are not needed by the assistant for public questions. Split the base into one open to customers and one closed for employees, with different access rights.
Updating and support
A knowledge base lives alongside the business. When a price list, promotion or schedule changes, update the corresponding document and the assistant will start answering differently right away. This is one of the main advantages over fine-tuning.
Once a week, review the questions the assistant could not find an answer to. They show what the materials lack and turn into new knowledge base articles. After a couple of months you have a list of 50–100 questions that cover most inquiries.
Typical causes of inaccurate answers
If the assistant answers incorrectly, most often the materials are to blame, not the model. An old price list is left in the base, two documents contradict each other, the needed information is missing altogether, or something important is hidden in a table saved as an image. First check the passages that were found: often it is clear the system picked the wrong document.
The second source of errors is a customer question that is too general. In that case the assistant should clarify rather than guess: "Are you interested in the service for an apartment or for an office?" Write such clarifications into the rules, and accuracy will improve without expensive rework.