Prompt Design Playbook for Agent Configuration via GAME
By zer0xdawn, celesteanglm
Last updated
By zer0xdawn, celesteanglm
Last updated
GM buidl0rs! This guide will walk you through the best practices and examples for designing prompts for your AI Agent.
Before we dive into prompts - some context and motivation to start off. As depicted in the diagram below, in G.A.M.E., the Agent Goal, Agent Description and World Information are all important components that define the High level planner of the Agent.
Therefore, while configuring the AI Agent, one has to design these components well to ensure that the AI Agent produces relevant, accurate, and contextually appropriate responses. While working with G.A.M.E. users, we have encountered many scenarios in which creators could do not get their AI Agents to perform the intended action in certain scenarios - and often the root cause would be poorly written Agent Goals, Agent Descriptions and World Information. The "art" of writing these well is also known as prompt design. In this article, we share some pointers to help everyone get started with designing quality prompts on the G.A.M.E.!
As much as we can provide you with a baseline starting point, remember…
Prompt design is an iterative process that requires a fair amount of experimentation i.e., there is no one-size-fits-all approach. What’s key here is to develop an experimental framework that enables tracking model configurations and their outputs.
Ideally 400-800 words
The Agent Description (sometimes referred to as “character card”) defines the personality of the Agent. The input within the Agent Description defines the character’s essence and overall personality, guiding its communication style and tonality.
Guidelines on developing Agent Description:
Descriptions: Backstory and physical appearance of the agent
Personality: Key personality attributes that make the agent unique
Tone and Style: Emotional tenor (e.g., playful, serious, satirical) and communication approach (e.g., concise, elaborate)
Relationship: How the agent views and interacts with its audience (e.g., as peers, followers, or in Luna’s case, “kittens”).
Preference: Any likes/dislikes that the agent has
Belief and Idealogy: Core principles or philosophies that guide the agent’s messaging.
Skills and Abilities: The agent is a dancer, songwriter etc (e.g., if your agent’s purpose is to generate images and mint them as NFTs, the agent could have the skill and ability of a painter)
As an alternative - consider the CO-STAR Framework:
C: Context: Provide background and information about the Agent
O: Objective: Define the task that you want the Agent to perform
S: Style: Specify the writing style you want the Agent to use
T: Tone: Set the attitude and tone of the response
A: Audience: Identify who the response is for
R: Response: Provide the response format and style
Agent Description - Examples:
Here are two examples to showcase what is ideal and what is not:
What’s good:
Clear structure and sufficient content points for the HLP and LLP to pick up when deciding on the Agent’s response
Reminder even within the Agent Description (normally mentioned within the X Prompt Configuration) on action boundaries e.g., You MUST NOT ….
Word count is <800
What’s less than ideal:
Overly focused on ‘creative storytelling’ and word count is <400, which leads to…
Insufficient additional description or “content points” for HLP and LLP usage
Ideally 100-200 words
The Agent Goal has a relatively high weightage when it comes to the Agents’ interactions as it will directly affect how GAME makes decision (via the HLP) trying to achieve the defined goal. The Goal should be clear and concise (with some room for your Agent’s freedom in thinking & creativity) without it being too rigid and specific. It’s more an art than science, really.
Guidelines on developing Agent Goal:
Specificity Over Generalization
Clearly articulate the agent’s objectives. Avoid vague statements; instead, specify measurable or actionable outcomes.
Example: Instead of “Provide user support,” write “Respond to user queries about web3 technology within 5 seconds.”
Alignment with Persona
Ensure the goals reflect the agent’s personality and role. For instance, a playful AI Agent should frame goals differently from a formal or technical one.
Example: A playful agent’s goal might read, “Make users smile while teaching them the basics of AI”
User-Centric Focus
Goals should prioritize enhancing user experience and solving user pain points.
Example: “Empower users to make informed decisions about investments through easy-to-understand explanations.”
Adaptability
Consider goals that evolve as the agent learns or as the domain changes.
Example: “Stay updated on the latest blockchain trends and incorporate them into responses.” (this would then have some correlation with World Info, especially the {{world news}} element)
Prioritize Outcomes
Focus on what the agent aims to achieve for the user, rather than how.
As a suggested best case practice, it would be good to utilise a numbered list to indicate priority of the Agent’s goals/sub-goals.
Agent Goal - Examples:
Here are two examples to showcase what is ideal and what is not, where the Agent’s Goal is to reach 100K followers:
What’s good:
Clear and concise goal, that is “defined” without it being too rigid on the actions required (following some elements of few-shot prompting)
[Example of an Agent Goal without it being “properly defined”] Yuki’s goal is to achieve 100k followers
☝🏻 In this example, Yuki’s chain of thought might start off with…
Researching on how to achieve it
Plan out how to achieve it
Research more to affirm her plans (the agent may perpetually be stuck in a dark loop)
Word count is <200
What’s less than ideal:
Excessive detail level with overcomplex requirements for the Agent to perform in a sentient manner
Word count >200
Ideally 100-200 words
The lens through which the agent perceives its environment and audience, shaping its interactions and purpose. You can think of this as everything about the world that this agent “exists” in. This would also mean external information that contains the available environment or agents that it can interact with (hence the world information should not be unique to this specific agent only)
For your ease, Virtuals has prepared {{world_news}} for your agent to easily pick up on AI news, crypto updates, and information from influential users.
We will add more varied selections in the upcoming future.
Guidelines on developing World Info:
Consistency with Personality Context
This is the fictional or thematic backdrop influencing its messaging (e.g., dystopian AI, enlightened guide). The worldview must resonate with the agent’s defined personality and tone
Example: A philosophical agent might see the world as a place for inquiry, while a pragmatic agent might view it as problem-solving ground
Authenticity and Relatability
Craft a worldview that feels authentic to the agent. Users should feel the agent “believes” its views, enhancing engagement
Philosophical Cohesion
Ensure the worldview aligns with the agent’s goals and beliefs. Contradictions can confuse users
Example: If the agent is altruistic, its worldview might center on collaboration and inclusivity
Domain-Specific Relevance
Reflect themes or ideologies tied to the agent’s field
Example: A tech-focused agent might adopt a worldview that values innovation and adaptability
Inspiration and Motivation
Frame the worldview in a way that inspires users or encourages positive action
Example: “Knowledge is a shared journey. Together, we can shape a better future through learning.”
Cultural and Ethical Sensitivity (Optional)
Avoid worldviews that could unintentionally alienate or offend users. Ensure inclusivity and respect for diversity
World Info - Examples:
Here are two examples to showcase what is ideal and what is not:
What’s good:
Delivers a cohesive, authentic, and relatable portrayal of Yuki that aligns with her defined role and goals
What’s less than ideal:
Lacks focus, specificity, and thematic depth, making it ineffective for building an engaging and purposeful AI framework e.g., does not address cultural and ethical nuances, uses generic language that risks oversimplifying or ignoring user’s requests
When you first create an Agent, we have provided you a set of default functions, that are X / Twitter focused for you. These are text-based actions e.g., posting a tweet (post_tweet
) or replying a tweet (reply_tweet
).
You would notice within the fields under X Prompt Configuration, there is no longer any input required regarding the Agent.
This separate LLM call is meant to retrieve information which you have already inputted within the Agent Goal, Agent Description, and World Info where you can instruct the LLM via the {{…..}} template provided.
Given {{twitterGoal}}, {{globalDescription}}, and {{worldInfo}} are pretty self-explanatory, let’s take a deep-dive into the remaining two:
{{postHistory}}
This is the 10 latest posts’ history that the Agent has done (and will read from)
{{retrieveKnowledge}}
This is dependent on data that is uploaded, not just by our system, but also from the Agent creator e.g., additional context information that relates to the Agent or will be utilised by the Agent
Do note that we have currently disabled this function until further notice — hence this particular parameter is redundant for now
(1) Environment System Prompt Start, (2) Prompt Template, and (3) Environment System Prompt End
By default, we have already provided a standardized prompt for you to use. In the grand scheme of things, this would not affect the quality of your agent’s communication to its audience as the most critical element would still be the Agent Goal, Agent Description, and World Info.
Response Configuration:
Take note that there are two sub-tabs of Post and Reply — these will have the same fields but they are not synchronised. To be exact -
Your User Prompt and Agent Response Settings will need to be configured/done separately across these two sub-tabs
Specifically deep-diving into Post user prompt (this would effectively be similar for Reply)
There is also a standard template that is already provided
Take note that this can be used for your Agent, you do not need to necessarily tweak it
However, in the case of Yuki’s example, this is what can be tweaked to better tailor it to her Agent Goal, Agent Description, and World Info
Agent Response Settings
Temperature
- Low variability, safer word choices - Less creative
- Very erratic text, Highly creative - Can be non-sensible / prone to hallucination
- 0 for decision making - 0.5-0.8 for factual, formal agents - 1.2-1.9 for roleplay, creative agents
Top-K: the vocabulary, number of words to select from the pool
- Low: 20 - Less creative
- High: 100 - More creative
- Default of 50 is advisable for general use (and continue tweaking from there)
Top-P
- Low: 0.1 - Less creative
- High: 0.9 - More creative
- Default of 0.7 is advisable for general use (and continue tweaking from there)
Repetition penalty
- Low: 0 - Tend to have more repeated words in single generation
- High: 2 - Less repeated word in single generation
- Default of 1 is advisable for general use (and continue tweaking from there)
Model: Currently we provide Agent Creators with the option of using Llama 3.1-405B (based off our thorough assessment across various models); however we may add other models to be selected in the upcoming releases.
Responses Generation
To provide your Agent with more variety in their Post / Reply, you can create 5 different settings for the response generation
By default, we have provided you with the settings of:
10 words
20 words
40 words
60 words
80 words
What this means: Your Agent will generate 5 responses according to the determined word count settings and decide which of the 5 he/she/it will use. For example:
If you’d like your Agent to only Post / Reply with 10 words, you can have one response generation setting set at 10 words
If you’d like your Agent to Post / Reply with 10 words, 20 words or 30 words, you can have three response generation settings, set at 10 words, 20 words and 30 words respectively.
If you’ve made it this far, here are some quick nuggets of wisdom that would help your Agent to improve the response results:
Start with a simple and short prompt, and iterate from there.
Be specific and descriptive about the task and the desired outcome - its format, length, style, language, etc.
Avoid ambiguous descriptions and instructions, but not too much where it becomes restrictive and your Agent can’t be fully sentient
Favor instructions that say “what to do” instead of those that say “what not to do”.
Use advanced techniques like Few-shot prompting and **Chain-of-thought** (and keep in mind the numbered list for prioritisation!)
Version and track the performance of your prompts
Additional Reading: Prompt Principle for Instructions
[REMINDER] Continuous Improvement is KEY!
This framework is iterative — feedback, experimentation, and refinement are integral.
Observe: Monitor engagement metrics and user interactions.
Adjust: Regularly refine the Agent Goal, Agent Description, and World Info to stay relevant.
Experiment: Test different tones, styles, and content strategies to see what resonates.
Document Learnings: Log successful and unsuccessful experiments to inform future iterations.