
Prompt Templates
Overview
A prompt template is the “brain” of an agent - it tells the AI:- Who it is and what role it plays
- How to respond to users
- What knowledge to prioritize
- When to use tools vs. answer directly
- How to handle edge cases
Prerequisites
System Requirements
- AGO platform deployed and accessible
- Admin access to create/edit templates
Knowledge Required
- Understanding of AI system prompts
- Familiarity with your use case requirements
How Prompt Templates Work
- User sends a message to an agent
- Agent retrieves relevant knowledge from the knowledge base
- Prompt template provides system instructions
- LLM generates response based on template + knowledge + user message
- Response is returned to user
Template Processing
The system refines your prompt template automatically:Creating Prompt Templates
- Navigate to AI Studio → Prompt Templates
- Click Create Template
- Enter template details:
- Name: Unique identifier (e.g., “support-agent-v1”)
- Type: Template category (optional)
- Prompt Content: The system instructions
- Click Save
Template Structure
A well-structured prompt template typically includes:1. Role Definition
2. Behavioral Guidelines
3. Knowledge Instructions
4. Tool Usage Instructions
5. Response Format
Example Templates
Customer Support Agent
Technical Documentation Agent
Sales Assistant Agent
Version History
AGO automatically tracks changes to prompt templates:Viewing Version History
- Navigate to AI Studio → Prompt Templates
- Select the template
- Click the Version History tab
- View all previous versions with timestamps and authors
Reverting to Previous Version
- In the Version History tab, find the version to restore
- Click Revert to this version
- Confirm the reversion
- The template is updated with the selected version’s content
Configuration Options
Template Fields
Best Practices
Writing Effective Prompts
-
Be Specific: Vague instructions lead to inconsistent responses
- Bad: “Be helpful”
- Good: “Provide step-by-step solutions with numbered instructions”
-
Define Boundaries: Clearly state what the agent should NOT do
- “Do not provide medical advice”
- “Do not share pricing without verification”
-
Include Examples: Show the expected response format
- “Example response: ‘Based on our documentation, you can…’”
-
Prioritize Knowledge: Tell the agent how to use retrieved documents
- “Always reference the knowledge base before answering”
- “Cite specific articles when possible”
-
Handle Uncertainty: Define fallback behavior
- “If you’re unsure, offer to create a support ticket”
- “When information isn’t available, acknowledge the gap”
Testing Templates
Before deploying a new template:- Test with common user questions
- Test edge cases and unusual requests
- Verify tool usage triggers correctly
- Check response format consistency
- Use Simulation Testing for automated validation
Template Maintenance
- Version Control: Use descriptive change summaries
- Regular Review: Audit templates quarterly
- User Feedback: Monitor satisfaction scores to identify issues
- A/B Testing: Compare template variations using different agents
API Reference
For programmatic prompt template management, see the Public API v1 Reference.Troubleshooting
Issue: Agent ignores prompt instructions
Issue: Agent ignores prompt instructions
Problem: Agent doesn’t follow guidelines in the template.Solutions:
- Move critical instructions to the beginning of the prompt
- Use stronger language (“You MUST…”, “NEVER…”)
- Add explicit examples of correct behavior
- Check if conflicting instructions exist
Issue: Agent responses are too verbose
Issue: Agent responses are too verbose
Problem: Responses are longer than desired.Solutions:
- Add explicit length constraints (“Keep responses under 3 paragraphs”)
- Include example responses showing ideal length
- Lower the LLM temperature for more focused responses
Issue: Agent doesn't use tools
Issue: Agent doesn't use tools
Problem: Agent answers when it should use a tool.Solutions:
- Add explicit tool usage triggers (“When the user asks X, use Y tool”)
- Describe tool capabilities clearly in the prompt
- Check tool configuration in Tools
Issue: Agent uses tools too often
Issue: Agent uses tools too often
Problem: Agent creates tickets or calls tools unnecessarily.Solutions:
- Add conditions for tool usage (“Only create tickets when…”)
- Emphasize answering from knowledge first
- Review tool prompts and descriptions
Related
- Agents — Agent configuration reference
- Prompt Engineering — Prompt writing techniques
- Simulation Testing — Test prompt changes
