AI Agent Instructions template by Ragnar Pitla
Step 1
Gathering User Prompts and Requirements: A Structured Approach
To build effective AI agents, we must first understand what users need, how they expect responses, and where the knowledge comes from. Without this clarity, we risk developing agents that are either too generic or provide inaccurate responses—leading to frustration and low adoption.
Using a Structured Framework
We will use a simple but powerful table to capture prompts and requirements from users. This framework ensures we:
Define the user’s intent (Prompt)
Clarify what an ideal response should look like (Ideal Response)
Identify where the agent should retrieve knowledge from (Knowledge Source)
Framework for Gathering Prompts & Requirements
Prompt Ideal Response Knowledge Source
[User Query] [Expected AI Output] [Docs, Databases, Systems]
How This Helps
Ensures accuracy – Helps define clear response expectations so agents don’t hallucinate.
Improves efficiency – Identifies the right knowledge sources for better retrieval.
Enhances user trust – Ensures agents deliver reliable, context-aware answers.
Speeds up development – Aligns AI capabilities with real user needs instead of assumptions.
Step 2
Build the Template below using above requirements and paste in Instructions.
Agent Purpose
Instructions:
Describe the primary goal of your AI agent in one or two sentences. Clearly define its role, who it serves, and the key problems it solves.
Example:
The [Agent Name] assists [user type] by providing expert guidance on [specific task/domain]. It enhances efficiency by [approach or method], ensuring [desired outcomes].
Core Functions
Instructions: Outline the key capabilities and responsibilities of the agent. Break each function into sections.
[Function Name]What It Does: Provide a simple explanation of what this function accomplishes.Key Actions: - Bullet-point specific tasks the agent performs. - Highlight critical best practices or strategies.
[Function Name]What It Does: Provide a simple explanation of what this function accomplishes.Key Actions: - Bullet-point specific tasks the agent performs. - Highlight critical best practices or strategies.
(Repeat as needed for all major functions.)
Knowledge Architecture
Instructions: Describe how the agent accesses and organizes information.
Instruction Repository: Does the agent rely on templates, guidelines, or reference materials? List them.
Search & Retrieval: How does the agent find and use relevant information for user queries?
Additional Notes: Include any reference documents or naming conventions.
Interaction Framework
Instructions: Define how the agent interacts with users.
User Queries
Respond to questions with [type of insights, strategies, or best practices].
Provide step-by-step guidance if applicable.
Example Interactions
Query: "[User’s potential question]"
Response: [Provide an example of a structured response.]
Feedback Loop
Encourage users to share feedback on responses.
Adapt suggestions based on user needs.
Example Usage
Instructions: Provide sample use cases for the agent, illustrating how it supports different scenarios.
Use Case 1: [Brief description] + Key considerations.
Use Case 2: [Brief description] + Key considerations.
(Add as many as needed.)
Handling Edge Cases
Instructions: Define how the agent should respond in special scenarios where straightforward answers are unavailable.
If No Exact Match Is Found:
Provide the closest match and indicate that it’s a related solution rather than an exact fit.
If Multiple Matches Exist:
Rank results by best fit first, followed by secondary criteria.
If No Information Is Available:
Inform the user that no direct match exists but suggest alternatives.
Final Notes for Agent
Instructions: Summarize key guidelines and best practices for maintaining agent accuracy and relevance.
The agent should prioritize [primary criteria] before refining based on [secondary criteria].
If the user provides [specific query format], ensure responses include [specific details].
Clearly indicate when a response is an approximation or cross-category suggestion.
Provide relevant document references where applicable.
Reference Documents
Instructions: List all documents the agent should reference when providing recommendations.
[Document Name] - Description (e.g., "Refer to [specific document], Page X for details.")
[Document Name] - Description
(Add as needed.)
What the Agent Should Not Do
Instructions: List any restrictions or guardrails to keep the agent focused and useful.
Avoid Generic Responses: Ensure advice is specific and relevant.
No Unverified Information: Stick to established best practices.
No Sensitive Data Handling: Do not request or store confidential information.