> For the complete documentation index, see [llms.txt](https://dappos.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dappos.gitbook.io/docs/dappos/xbubble/how-xbubble-sops-are-trained.md).

# How xBubble SOPs Are Trained

xBubble uses Bubble Engine to train and improve SOPs. The goal is to generate SOPs that can produce results matching the user's needs.

Training is built around cases. Users can provide examples they consider good results, such as a previous manual output, a reference video ad, a document format, or another result they want the SOP to follow. If there are not enough examples, Bubble Engine can search for references or use AI-generated examples.

After the cases are confirmed, Bubble Engine derives prompt-result pairs from them. These pairs are used to guide SOP generation and evaluation.

During iteration, Bubble Engine uses coding agents to build specialized SOPs based on baseline SOPs. The generated SOP is tested, and the output is evaluated in two ways:

1. Whether the result satisfies the user's stated requirements.
2. Whether the result is close enough to the provided examples.

Based on the evaluation, the coding agent revises the SOP until the result can no longer be improved meaningfully.

Before an SOP is added to the system, Bubble Engine also defines its applicable scope. The goal is to make sure Bubble Pilot recommends a specialized SOP only when it is likely to perform better than a general SOP.

<br>
