The goal is what the agent is actually trying to accomplish — everything else in the architecture (context, actions, state) exists in service of reaching it, or correctly recognizing that it can't be reached.
Goal Specificity Matters — A Lot
| Vague Goal | Well-Specified Goal |
|---|---|
| "Help the user with their data" | "Find the total revenue by region for Q1 2026 and identify the region with the lowest growth vs Q4 2025" |
| "Improve this code" | "Fix the failing test in `test_checkout.py` without modifying the public API of `Checkout`" |
A vague goal gives the LLM more room to misinterpret what "done" looks like — a well-specified goal gives it a concrete target and a way to check its own progress against it.
Goal vs Sub-Goals (Plan)
Top-level goal (given by the user):
"Prepare a summary of last quarter's customer complaints by category"
Agent-generated sub-goals (its own plan, not given directly):
1. Retrieve last quarter's complaint records
2. Categorize each complaint
3. Count complaints per category
4. Summarize the top 3 categories with example complaints
The user provides the top-level goal; the agent often derives its own intermediate sub-goals as part of planning — the specifics of how depend on whether the system does explicit up-front planning or decides one step at a time.
Defining "Done"
A goal needs an implicit or explicit success condition — otherwise the agent (or the surrounding system) has no principled way to know when to stop, beyond an iteration cap. For narrow tasks this can be simple ("the query returned a result"); for open-ended tasks it often requires the LLM itself to judge sufficiency, which introduces its own reliability considerations (see Self-Evaluation).
Common Mistakes
- Giving an agent an ambiguous, open-ended goal with no clear success criterion, then being surprised the agent's behavior is inconsistent across runs
- Assuming the agent will always correctly infer unstated constraints ("don't modify production data," "stay under budget X") — constraints that matter should be stated explicitly in the goal or system instructions, not assumed
Interview Relevance
"Why does goal specification matter for agent reliability?" — a strong answer connects vague goals to inconsistent agent behavior and difficulty evaluating success, not just "clearer is better" as a vague platitude.
Practice Question
Rewrite the vague goal "help the customer with their order" into a well-specified goal with an explicit success condition.