What are Objectives? Objectives are evaluation prompts that guide a conversation toward concrete outcomes and let an evaluator LLM determine completion and extract structured variables. They influence both the conversational LLM (what to work toward) and the evaluator (what to verify and extract).This guide is a deep dive on best practices for structuring your objectives. For basic setup, parameters, and API details, see the main Objectives documentation:
How the System Works
Tavus uses two LLM roles during a conversation:- Conversational LLM: talks to the user and steers toward completing objectives.
- Evaluator LLM: checks completion status and extracts variables from conversation history.
objective_prompt influences both:
- It is injected into the conversational behavior (what to gather and confirm).
- It is used by the evaluator to decide completion and extraction quality.
What Good Prompts Look Like
Good objective/guardrail prompts are:- Clear: unambiguous and concrete
- Specific: one goal at a time
- Testable: easy to validate with sample conversations
- Robust: handle real user variation and edge cases
Objective Prompt Template
[Action] [specific information or condition] [optional criteria]
Examples:
Collect the user's first name, last name, and email addressUser has explicitly agreed to the terms and conditionsCheck if an error message is visible on shared screen and extract error code
Objective Types
1) Information Extraction Objectives
Use when you need structured data.2) Condition Check Objectives
Use when a verifiable condition must be true before proceeding.3) Visual Objectives
Use for camera or screen-share analysis.Output Variables Best Practices
Naming
Good variable names:first_name,last_namepreferred_contact_methodappointment_date,appointment_timereason_for_visit
info,data,thing1,user_response
Granularity
Prefer atomic fields over one giant blob. Good:NOTFOUND
If a value is missing, evaluator may return "NOTFOUND". That is expected.
Do not put NOTFOUND handling instructions inside objective prompts. Handle it in app logic.
Conditional Objectives
Use conditional objectives to route a workflow.- Prefer 2-5 branches.
- Keep branch conditions distinct.
- Include a catch-all path.
- Base conditions on conversation content (not hidden database state).
Guardrails
Guardrails are passive monitors for policy/safety/compliance conditions.- Continuously evaluated in background
- Do not drive normal workflow progression
- Trigger callback/webhook logic when violated
- Use objective for information/workflow progress.
- Use guardrail for monitoring violations/alerts.
Common Mistakes (and Fixes)
1) Writing instructions instead of outcomes
Bad:2) Future-state checks
Bad:3) Overloaded objectives
Bad: one objective collects 15 unrelated fields. Good: split into focused objectives (get_name, get_contact, get_address).
4) Overlapping conditional branches
Bad:Testing Checklist
Before shipping prompts:- Test one-message answers (user gives everything at once)
- Test multi-turn collection (piece by piece)
- Test corrections (
Actually, it's Jon not John) - Test refusal cases (
I'd rather not share that) - Test ambiguity cases (
Sometime next week) - Track variable-level
NOTFOUNDrates in production

