An offline loop improves an agent between deployments: it evaluates proposed changes and routes a candidate through a deployment gate before applying it. Its four steps are act, signal, search, and apply, then repeat. section 1.2.3 section 1.5
A prompt-improvement loop puts those steps into practice:
- Act with a baseline RAG agent prompt; score its output with an LLM-as-Judge signal. section 2.0
- Search for better prompt variants with Self-Supervised Prompt Optimization (SPO), then evaluate candidates. section 2.0
- Inspect the candidates and promote a winner through the deploy gate; the running agent keeps its original prompt until promotion. section 2.5
Figure 1.7 shows a comparison between the offline and online self-improvement loop where the significant difference is the deployment gate that manages deployments of improved variants

Compare offline and online loops by their deployment gate, the key difference between the two cadences. section 1.2.3
