Goal Setting & Monitoring
Tell the agent EXACTLY what 'done' looks like
Imagine you send a new intern to "sort out the office party." If you never say what success means, they might spend the whole day picking balloon colours and forget the food. Goal Setting means writing down a clear, measurable target and a checklist for "done." Monitoring means checking, step by step, whether the agent is actually getting closer to that target, and stopping it if it wanders off.
Key points
- A vague goal makes an agent drift and waste money.
- Success criteria = a checklist the agent (and you) can verify.
- Monitoring = checking progress each loop, plus stopping conditions.
What 'Goal Setting & Monitoring' means
Goal Setting is giving the agent a specific, measurable target plus clear success criteria (how we know it's finished). Monitoring is continuously comparing the agent's progress against that target and applying stopping conditions so it doesn't loop forever or wander off task.
Note: Clear goal + measurable success criteria + progress checks + stop rules = an agent that finishes the RIGHT job.
Vague goal vs measurable goal
VAGUE GOAL (agent drifts) MEASURABLE GOAL (agent focuses) ────────────────────────── ───────────────────────────────
"Make the report better" "Cut the report to <500 words, │ add a 3-bullet summary, fix ▼ all spelling." ┌─────────────┐ │ │ agent guesses│ ▼ │ endlessly... │ ┌──────────────┐ │ 🌀 🌀 🌀 │ │ check 3 boxes │ └─────────────┘ │ [x] <500 words│ │ │ [x] summary │ ▼ │ [x] spelling │ ❓ never sure it's done └──────┬───────┘ ▼ ✅ all 3 met = DONE
The 4 ingredients of a good goal
- Specific target — One clear outcome, not a fuzzy wish. Example: "Book 1 flight under ₹5000 to Delhi on Friday" not "sort out travel".
- Success criteria — A checklist that is true/false, so 'done' is not an opinion. Example: price < 5000 AND date == Friday AND seat == confirmed.
- Progress signal — Something you can measure each loop to see if it's improving. Example: criteria_met = 1 of 3 → 2 of 3 → 3 of 3.
- Stopping conditions — Rules that end the run: success, max steps, budget, or no progress. Example: Stop when all criteria met OR after 10 steps OR cost > ₹20.
The monitoring loop (goal in the middle)
┌─────────────────────────┐ │ GOAL + SUCCESS CHECK │ │ [ ] <500 words │ │ [ ] has 3-bullet summary│ │ [ ] spelling clean │ └────────────┬────────────┘ │ compare every step ┌─────────────────────────┼─────────────────────────┐ ▼ ▼ ▼ ┌─────────┐ act ┌─────────────────┐ observe ┌──────────────┐ │ THINK │───────► │ DO ONE STEP │─────────► │ CHECK PROGRESS│ └─────────┘ └─────────────────┘ └──────┬───────┘ ▲ │ │ not all boxes ticked AND steps left AND budget │ └────────────────────────────────────────────────────┘ │ all boxes ticked │ OR out of steps/budget ▼ 🛑 STOP
A tiny code example (read it like English)
Here the goal is a checklist of functions. Each loop we re-run the checklist, count how many pass, and stop the moment all pass or we hit a safety limit.
MAX_STEPS = 10
MAX_COST = 20.0 # rupees
def success_criteria(report):
return {
"under_500_words": len(report.split()) < 500,
"has_summary": "Summary:" in report,
"spelling_ok": spell_check(report) == 0,
}
report, cost, step = draft(), 0.0, 0
while True:
checks = success_criteria(report)
met = sum(checks.values())
print(f"step={step} progress={met}/3 cost=₹{cost:.1f}") # MONITOR
if all(checks.values()):
print("✅ goal reached"); break # stop: success
if step >= MAX_STEPS or cost >= MAX_COST:
print("🛑 stopped: hit a limit"); break # stop: safety
report, spent = improve(report, failing=checks) # ACT
cost += spent; step += 1
When to invest in goals & monitoring
| Scenario | Recommendation | Why |
|---|---|---|
| Open-ended task ('improve', 'research', 'optimize') | ✅ Define measurable criteria | Without them the agent never knows when to stop. |
| Long multi-step jobs that cost real money | ✅ Add progress + budget checks | Monitoring catches runaway loops early. |
| A single, deterministic transform you fully control | ❌ Lightweight is fine | There's only one step; nothing to drift. |
| User-facing assistant that must not stall | ✅ Add stopping conditions | Guarantees a timely answer instead of silence. |
Goal & monitoring mistakes
| Mistake | Consequence | Fix |
|---|---|---|
| Goals written as vague wishes ('make it good'). | The agent can't tell when it's done, so it drifts or stops too early. | Turn the goal into true/false checks you can run automatically. |
| No stopping condition besides 'success'. | If success is never reached the agent loops forever and burns budget. | Always add max-steps, max-cost and no-progress stop rules. |
| Measuring nothing during the run. | You only find out it went wrong after it finished (or crashed). | Log progress (e.g. 2/3 criteria met) every loop so you can watch live. |
Remember these lines
- If you can't write 'done' as a checklist, the goal is too vague.
- Every loop: measure progress, then decide whether to continue or stop.
- Three stop rules to always have: success, max-steps, max-budget.
Key takeaways
- Goal Setting gives the agent a specific target plus measurable success criteria.
- Monitoring compares progress to that target every step of the loop.
- Stopping conditions (success, max-steps, max-budget, no-progress) prevent runaway agents.
- If you can't express 'done' as true/false checks, your goal is still too vague.
Frequently Asked Questions
What is Goal Setting & Monitoring?
Imagine you send a new intern to "sort out the office party." If you never say what success means, they might spend the whole day picking balloon colours and forget the food. Goal Setting means writing down a clear, measurable target and a checklist for "done." Monitoring means checking, step by step, whether the…
How does Goal Setting & Monitoring work?
Goal Setting is giving the agent a specific, measurable target plus clear success criteria (how we know it's finished). Monitoring is continuously comparing the agent's progress against that target and applying stopping conditions so it doesn't loop forever or wander off task.
What are the key takeaways about Goal Setting & Monitoring?
Goal Setting gives the agent a specific target plus measurable success criteria. Monitoring compares progress to that target every step of the loop. Stopping conditions (success, max-steps, max-budget, no-progress) prevent runaway agents. If you can't express 'done' as true/false checks, your goal is still too vague.
Related topics
Practice this on DevInterviewMaster
Read the full Goal Setting & Monitoring breakdown with interactive demos, quizzes, and Hinglish notes.
800+ system-design, LLD, coding, and design-pattern topics. Unlock everything with Pro (₹499, one-time) or Ultimate (₹999, one-time) — lifetime access, no subscription.