Beginner-Friendly Topic
Take your time - it's perfectly normal to re-read this topic 2-3 times. Try the interactive code editor below to run code yourself. Use the Q&A section to check your understanding before moving on.You've got this!
Goal-Based AI Systems
Goal-based AI systems are designed around outcomes, not instructions. The agent receives a goal and determines what steps to take, rather than following a fixed script.
What Is a Goal?
A goal is the outcome the agent is supposed to achieve. It describes what the end state should look like.
Goal examples:
- 'Prepare my weekly task summary and send it to my email by 5pm Friday'
- 'Find the top 5 competitors for our product and list their key features'
- 'Monitor server response times and restart the service if response time exceeds 3 seconds'
A goal is different from an instruction.
Instruction: 'Search Google for competitors.'
Goal: 'Identify and report the top 5 competitors for our product.'
Instructions tell the agent what to do. Goals tell the agent what to achieve. The agent decides how to achieve the goal.
Goal Properties
- Clear: the agent should be able to determine when the goal is complete
- Specific: vague goals lead to unpredictable agent behaviour
- Bounded: the goal should have a clear scope so the agent does not do too much or too little
- Achievable: the goal should be within what the agent's available tools can accomplish
- Safe: the goal should not require actions that should not be taken without human approval
Goal Definition Example
# Goal definition for a personal task agent
goal = {
"objective": "Prepare weekly task summary",
"scope": "tasks assigned to user this week",
"output_format": "structured summary with completed, pending, and overdue items",
"delivery": "email to user by Friday 5pm",
"escalation": "ask user if more than 10 tasks are overdue",
"approval_required": False # Can run automatically
}
print("Goal defined. Agent will plan steps to achieve this goal.")
print(f"Objective: {goal['objective']}")
print(f"Approval required: {goal['approval_required']}")Key Takeaways
- Goal-based AI systems are designed around outcomes, not instructions.
- Clear: the agent should be able to determine when the goal is complete
- Specific: vague goals lead to unpredictable agent behaviour
- Bounded: the goal should have a clear scope so the agent does not do too much or too little