-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation - Some clarification / explanation would be helpful on a few items #158
Comments
The extra_instructions parameter allows you to add additional instructions to the end of the model's default system prompt without replacing or modifying the default instructions themselves. Default instructions: These are the base set of instructions that guide the model’s behavior. They are predefined and are meant to set up the model for its expected tasks. extra_instructions: When you use extra_instructions, you are adding extra directives that augment or clarify the behavior of the model on top of its default behavior. This can be useful if you want to provide a more specific instruction without completely replacing the default instructions. You are not replacing the default instructions when you use extra_instructions; instead, you're appending additional instructions to guide the model further in the desired way. If you want to entirely override the default behavior, you would replace or modify the system prompt directly.
A PromptTemplate is a structured template used for generating dynamic prompts based on variables or placeholders. It is typically a string format that includes placeholders, which can later be replaced with specific values to generate a complete prompt for the model. For example: system_prompt_template = "Hello {name}, how can I assist you today?" In this template, {name} is a placeholder, and when you use it, you would substitute it with an actual user’s name. Purpose: PromptTemplate helps generate prompts dynamically by injecting specific values into the prompt when needed. It's a more flexible approach compared to hardcoding specific prompts. Usage: Depending on the framework or tool you’re using, a PromptTemplate may be used with a formatting method (e.g., str.format in Python or other ways to insert values). In this context, the PromptTemplate might allow you to easily reuse a common structure of instructions with different dynamic inputs, and you can configure it by filling in values as needed.
In many cases, the system message role is used to determine how a message is framed or categorized. You may think of the system message role as denoting the origin or nature of the message—whether it’s from the system (i.e., the environment or model settings) or another entity. While "system" is the most common role, the ability to make it configurable can be helpful if you want to separate out different roles within the same framework. For example, you could have different roles like: system: Default settings or environment-level instructions. user: Messages coming from the user, often for context or conversational modeling. assistant: Responses generated by the model itself. The reason for configurability is to offer flexibility for scenarios where the model may interact with various roles. In some cases, a more complex, structured interaction may require flexibility to specify whether a message is coming from the system or another part of the conversation. |
Hi @highdealist, if you believe my response is sufficient to resolve the issue, please feel free to close it. If you have any further questions or need clarification, don't hesitate to ask. |
https://docs.phidata.com/agents/prompts
Items:
Question / issue: What is the difference between this and just adding more instructions to the default instructions? Or is the default instructions referring to the model's default instructions and this appends additional instructions to the default instructions instead of replacing the default instructions?
Question / issue: What is a PrompTemplate / How do I use it (is it different than other frameworks' prompt templates)? Where is it described in the documentation? A link to it would be good.
The text was updated successfully, but these errors were encountered: