Retrain Your Agent
Overview#
Adding a source puts it in the agent's knowledge. Training is what puts it into the agent's answers: it rebuilds the index the agent searches when someone asks a question.
Until you train, a new source sits there unused — and a removed one can still turn up in answers.
When to train#
| Train after you… | No need to train after you… |
|---|---|
| Add a source — a document, website, text or Google Drive file. | Change Behaviour — the persona, system prompt or rules. |
| Remove a source. | Change Escalation. |
| Update content the agent relies on — a web page you imported has changed, say. | Change the Model or temperature. |
| Notice the agent giving out-of-date answers after a product or policy change. | Change the Appearance. |
Training the agent#
Open the agent in the builder and choose Train, in the bar at the top. While it runs, the button shows how far along it is.
You can also start it from:
- Train now, in the Knowledge section. It appears with a note saying how many sources are not in the agent yet.
- Train the agent, in the builder's Jump to… menu.
Train is unavailable while a training run is already going, and when the agent has no knowledge at all.
Add everything first, then train once
Each training run processes every source together. If you are adding or removing several, make all the changes first and train once at the end.
Knowing where you are#
The builder tells you when there is training to do. The top bar shows how many sources are untrained, and each source in Knowledge has a status:
| Status | Means |
|---|---|
| Trained | In the agent and used in its answers. |
| Not trained | Added, but not in the agent's answers yet. Train to include it. |
| Training | Being processed now. |
| Failed | Did not train. Check the file or address, remove the source and add it again. If it keeps failing, report a problem. |
While it trains#
Training usually takes a few minutes; a large amount of knowledge takes longer.
The agent keeps working
Customers can keep talking to the agent while it trains. It answers from its previous knowledge until the new training finishes — so a change you are training is not live until it is done. Avoid training a big change in your busiest hours.
Checking it worked#
When every source reads Trained, ask the agent something only the new source can answer — in the builder's test chat, or in the Playground.
If it answers from the new material, the training took. If it doesn't, check the source is marked Trained and that the question is one the source actually answers.