Skip to main content

How custom prompts work?

Custom Prompting for Specialized Agents in the Solana Ecosystem

Prism agents offer advanced custom prompting capabilities, allowing users to tailor agent behavior and responses to meet specific needs. This guide outlines how to utilize custom prompting to create highly specialized agents within the Solana ecosystem, along with best practices, examples, and tips for iterative improvement.

Overview of Custom Prompting

Custom prompting in Prism enables you to define the precise nature and functionality of your agents. By providing clear and specific instructions, you can guide agent behavior, ensuring appropriate query responses and effective task execution.

Best Practices for Custom Prompting

  • Be specific: Clearly outline the agent's purpose, scope, and behavior. Provide detailed instructions for handling different query types.
  • Use clear language: Avoid ambiguity by using concise, straightforward language. This helps the agent understand and execute tasks effectively.
  • Include example queries: Provide various examples to help the agent understand potential questions and appropriate responses.
  • Set contextual boundaries: Define the scope of information the agent should access and any limitations on response types.
  • Monitor and iterate: Continuously evaluate agent performance and user feedback to refine your custom prompts over time.

Creating a Custom Prompt

When creating an agent, define a custom prompt that serves as a roadmap for the agent to process queries and interact with the system.

Steps to Implement Custom Prompting

  1. Define the Agent's Purpose: Clearly state the agent's primary objectives to set the context and guide responses.
"prompt": "You are a helpful AI agent
specializing in Solana blockchain
knowledge."
  1. Provide Detailed Instructions: Specify how the agent should handle various query types, including tone, style, and depth of responses.
"prompt": "When asked about Solana token
transactions, provide a detailed list of
recent transactions, including sender,
receiver, amount, and timestamp.
Use a friendly and informative tone."
  1. Include Example Queries: Example queries help the agent understand the questions it may encounter and appropriate responses.
"prompt": "If a user asks 'What is the
current price of SOL?', respond with
the latest price from a reliable source,
such as CoinGecko."
  1. Set Contextual Boundaries: Define the scope of information the agent should access and any limitations on response types.
"prompt": "Limit responses to data
available within the Solana blockchain
and related financial metrics. Do not
provide information outside this scope."

Iterative Improvement

Continuously monitor agent performance and user feedback to refine your custom prompts over time. This will help your agents adapt and improve, ensuring they remain effective and user-friendly.

Common Pitfalls and Examples

Poorly Written Custom Prompt: "Provide information about Solana stuff."

Why it doesn't work: The prompt lacks specificity and guidance, making it challenging for the agent to understand its purpose and provide relevant responses.