Build a RAG chatbot: the pipeline from documents to answers
A RAG chatbot answers from your documents by retrieving the right passages first. See each stage of the pipeline, a small code sketch and the failures to test for.
Read articleFine-tuning teaches a model a style or a format, not your changing facts. A symptom table shows when to fix sources, procedures or prompts first, and when tuning pays.
By the Askocto team · · 4 min read
Finetuning an LLM means training a model further on your own examples so it behaves in a particular way. For customer support, it is good at shaping style, format and narrow classification tasks, and poor at teaching facts that change, such as prices, policies and stock. Most wrong support answers come from missing or unclear sources, so fix those first. Fine-tuning comes last on the list, not first.
In short: If the problem is wrong facts, fix sources. If it is wrong steps, fix procedures. If it is tone or format, fix instructions. Consider fine-tuning only when those are in order and a consistent pattern remains.
A fine-tuned model has seen many examples of inputs and the outputs you wanted, and it adjusts toward that pattern. That helps with consistency: the same structure, the same voice, the same label for a given kind of message.
It does not give the model a reliable, up-to-date database of your business. Facts learned in training are hard to inspect, hard to correct and out of date the day your policy changes. Retrieval from sources is better here, since you can see which passage an answer came from and fix it by editing one article. RAG vs fine-tuning compares the two in depth.
Start with what you see, then pick the cheapest fix.
| Symptom | Likely cause | First fix | Fine-tuning? |
|---|---|---|---|
| States a wrong return window | Outdated or missing source | Update the source, retrain | No |
| Invents a policy | Gap in sources, weak decline rule | Add content, add a rule to decline | No |
| Skips a step in refunds | Procedure unclear or missing | Rewrite the procedure | No |
| Too wordy or too stiff | Instructions too loose | Add tone rules and examples | Rarely |
| Inconsistent reply format | No required structure | Specify the format in instructions | Possibly, after that |
| Mislabels incoming tickets | Ambiguous categories | Clarify categories, add examples | Possibly, for classification |
| Needs a house style across thousands of replies | Style cannot be described in a few lines | Try examples in the prompt first | Possibly |
The right column is deliberately cautious. Most rows end in "no" because cheaper fixes exist and are easier to change.
Each is quick to change and quick to undo. A fine-tuned model is neither.
Fine-tuning is a project. Before starting, answer these:
If the held-out test shows no clear gain over a prompt with examples, stop.
All three are narrow. None replaces knowledge from your sources.
On a support platform, most of the "cheaper fixes" are first-class features. In Askocto, for instance, you edit sources under Build > Sources, procedures under Build > Procedures, guardrails under Build > Guardrails and the model under Build > Models, and you replay conversations in Test to compare before and after. The procedures feature shows how the steps are written. That makes the first four fixes an afternoon of work. For help writing instructions, see how to write prompts to get the best results.
It is training a model further on your own examples so that it behaves in a consistent way, such as a style or output format.
Usually not first. Wrong facts are fixed by sources, wrong steps by procedures and tone by instructions. Consider tuning when those are in order and a pattern remains.
They do different jobs. Retrieval supplies current facts and shows its sources. Fine-tuning shapes behavior. Many support problems need retrieval, not tuning.
You shape an agent through sources, procedures, guardrails and model choice rather than by training a model. That keeps every change visible, testable and reversible.
Askocto answers the repeat questions across chat, email and voice and hands the hard ones to your team.
A RAG chatbot answers from your documents by retrieving the right passages first. See each stage of the pipeline, a small code sketch and the failures to test for.
Read articleA hallucination is a confident answer that is not true. See the five forms it takes in customer support, why models produce it and the controls and tests that cut it down.
Read articleRetrieval finds candidates and reranking puts them in the right order. See how the second pass works, when it is worth the extra step and how to measure the gain.
Read article