Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can author custom prompts to configure instructions to an Azure OpenAI Service model for your custom agent.
You can add custom prompts to your agent at either of two levels:
- At the agent level
- At the topic level
Add a new prompt as an action to an agent
Select Agents in the left pane and select the agent to which you want to add a new prompt as an action.
Select the Actions tab.
Select Add an action.
Select New action > New prompt.
The custom prompt editor opens. You can use this editor to create a custom prompt for your agent.
Add a prompt node in a topic
Select Agents in the left pane and select the agent to which you want to add a new prompt as an action.
Select the Topics tab.
Open a topic and select the Add node icon
below the node under which you want to add the new node.
Select Add an action > New prompt.
The custom prompt editor opens. You can use this editor to create a custom prompt for your agent.
Note
Agents configured to allow anonymous users (no authentication) can't use Dataverse tables as knowledge sources. However, you can still specify input parameters for the prompt, choose the desired GPT model to run the prompt, and set the desired temperature to control the randomness and creativity of the generated text.
Configure and test a prompt with the embedded AI Builder prompt editor
The custom prompt editor is a powerful tool that allows you to create, customize, and test prompt templates for your agent. The editor uses the same interface as the AI Builder prompt editor, which is designed to help you create effective prompts for your agent.
The prompt editor lets you write your prompt instructions in a few different ways. You can:
- Write out your own instructions manually
- Use Copilot to generate instructions for you based on your description of what you want the prompt to do
- Use a preset template from the prompt library to create a prompt
You can configure several aspects of the prompt, including:
- Chat model to use for the prompt, and settings for the model such as temperature, settings for knowledge retrieval, whether to include links in the response, and whether to enable code interpreter and reasoning.
- User inputs to the prompt such as text and images, and sample data to test with.
- Knowledge to process and include from Dataverse tables.
- Formatting to apply to output.
When you are done creating your prompt, you can test it by specifying sample data for any inputs and selecting Test. The editor will generate a response based on the prompt and the sample data you provided.
For full details on how to use the editor to create and test prompts, see Create a prompt in AI Builder documentation.
Best practices for prompt instructions
When using the prompt node, it's important to follow best practices for prompt engineering. Here are some tips to help you get the most out of this feature:
- Be specific: Custom instructions should be clear and specific, so the agent knows exactly what to do. Avoid vague or ambiguous language that could lead to confusion or incorrect responses.
- Use examples: Provide examples to illustrate your instructions and help the agent understand your expectations. Examples help the agent generate accurate and relevant responses.
- Keep it simple: Avoid overloading your custom instructions with too many details or complex logic. Keep your instructions simple and straightforward so the agent can process them effectively.
- Give the agent a way out: Give the agent an alternative path for when it's unable to complete the assigned task. For example, when the user asks a question, you might include "respond with 'not found' if the answer isn't present." This alternative path helps the agent avoid generating false responses.
- Test and refine: It's important to test your custom instructions thoroughly to ensure they're working as intended. Make adjustments as needed to improve the accuracy and effectiveness of your agent's responses.
Important
- AI Builder prompts run on models powered by Azure OpenAI Service.
- This capability is limited to specific regions.
- This capability might be subject to usage limits or capacity throttling.