Running Continuous Improvement Loops
This lesson describes the continuous improvement loop, which turns production signals into measured changes, and two of its engines, semantic optimization and user feedback.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the five steps of the improvement loop.
- Automate prompt improvement with a semantic optimization loop.
- Collect explicit and implicit user feedback.
The improvement loop
The loop has five steps. Observe production through traces, continuous evaluation and feedback. Analyze failures and group them by cause (misunderstood intent, wrong tool, missing knowledge, guardrail block, model error). Propose changes to prompts, tools, retrieval, routing or models. Evaluate each change on the regression dataset with the same evaluators. Release the improvement through the normal pipeline and return to observing. Each confirmed failure becomes a new regression case so that it cannot silently return.
The following diagram shows the five steps as a loop.

The improvement loop
Semantic optimization loops
A semantic optimization loop automates the propose and evaluate steps. A model reads failing cases and the current prompt (or tool descriptions) and proposes revised versions; each candidate is evaluated on a training split of the dataset; the best candidate is confirmed on a held-out split to avoid overfitting; and a person reviews the change before release. The loop optimizes meaning-level artefacts such as instructions, examples and descriptions, rather than model weights.
best, best_score = current_prompt, evaluate(current_prompt, train_set)
for round in range(5):
failures = failing_cases(best, train_set)
for candidate in propose_revisions(best, failures, n=4): # model-generated rewrites
score = evaluate(candidate, train_set)
if score > best_score:
best, best_score = candidate, score
holdout_gain = evaluate(best, holdout_set) - evaluate(current_prompt, holdout_set) # confirm before reviewAn optimization loop that fools itself
User feedback loops
User feedback loops collect explicit signals (ratings, thumbs, comments) and implicit ones (rephrased questions, abandoned conversations, escalations, overrides by staff). Feedback is attached to traces so each signal links to the exact run. Negative feedback is triaged, confirmed failures are added to the regression set, and trends are monitored by intent and agent. Because explicit feedback is sparse and biased towards strong reactions, it is combined with sampled evaluations rather than used alone.
The following table summarizes the sources of improvement signals.
| Signal | Source | Typical use |
|---|---|---|
| Evaluator scores | Continuous evaluation | Detect regressions and trends |
| Explicit feedback | Ratings, thumbs, comments | Find failures users notice |
| Implicit feedback | Rephrasing, abandonment, escalations, overrides | Find silent failures |
| Synthetic tests | Simulators, red teaming | Cover rare and adversarial cases |
Explicit or implicit feedback?
Closing the loop
A support solution receives 2% thumbs-down feedback. The team has fixed several reported problems, but some recur after later releases.
Recurring problems mean fixes are not protected by tests. Each confirmed thumbs-down case should be added, with the expected behaviour, to the regression dataset that gates every release. Analysis should also group feedback by cause and agent to prioritize systemic fixes over individual patches.
What should happen to every confirmed failure?
Show answer
It becomes a regression case, so the same failure is caught automatically in future evaluations.
Exam Tips
Remember for the exam
- Observe, analyze, propose, evaluate, release; every confirmed failure becomes a regression case.
- Semantic optimization: model-proposed prompt revisions confirmed on a held-out set and reviewed.
- Combine sparse explicit feedback with implicit signals and sampled evaluation.