Train your bot
From clicking Train to a READY bot, end-to-end.
Training turns your uploaded documents into a knowledge base the bot can search. Until a bot is trained at least once, it cannot answer questions.
How to start training#
Open the bot's Source settings tab and click Train Bot. If the button is disabled, see Cannot train.
Training consumes credits proportional to document size. Make sure you have enough daily credit before training a large document set.
What happens, in order#
Prepare
Pegasus computes which documents are new/changed/removed compared to the last training. This delta drives the rest of the job.
Parse
The chosen parser (Marker or LlamaParse) reads each new/changed document and extracts Markdown.
Embed
Markdown is split into chunks; each chunk is embedded into a vector and stored in the bot's index.
Commit
Pegasus marks the bot READY and emits a completion event. The Train button label resets.
Watching progress#
While PENDING, the Train button is replaced by live status:
- "Waiting in queue (position )" — others are training first; you'll start when your turn comes.
- "Next in line" — your job starts as soon as a slot opens.
- "Preparing documents…" — computing the delta.
- "Parsing documents…" — extracting text.
- "Embedding chunks…" — building the vector index.
- "Retrying (attempt N)…" — a transient error occurred; Pegasus is retrying automatically.
Cancelling a training#
While PENDING, a Cancel button appears. Clicking it:
- If queued: removes the job from the queue immediately.
- If running: signals the worker to stop at the next safe checkpoint. The current file finishes parsing/embedding before cancellation completes.
The bot returns to its pre-training status (UNTRAINED or OUTDATED).
Training a fresh bot vs retraining#
- First training: every document is parsed and embedded — slowest case.
- Retraining: only changed/added/removed files are processed (delta). Often faster.
Training failures#
If a training run fails:
- The bot reverts to its previous status.
- "Last error: " appears on the bot detail page.
- The training did not consume the full credit cost; only partial work is billed.
→ Troubleshoot: Training failed
Daily credit limit#
Training also consumes the same daily credit pool as chat. If you hit the cap, you'll see "Daily credit limit reached. Cannot train now. Resets at midnight UTC." Wait for reset or upgrade your plan.