Configuring Prompts
Setting prompts is a critical step in building an agent application. Prompts are natural language instructions that guide large language models (LLMs) to complete specific tasks. For example, in the scenario of writing a novel, the prompt can be "Please generate the opening of a suspense novel, create a tense atmosphere, and describe the protagonist entering an abandoned villa on a rainy night." Prompts provide models with clear task objectives, standardize output formats, optimize generated content, and support personalized requirements. By carefully designing and optimizing prompts, you can ensure that agents generate content that meets specific styles and requirements.
Writing Prompts
You can write prompts based on service requirements. The clearer and more specific the prompts are, the more expected the responses from the agent are.
- Log in to the agent development platform.
- In the navigation pane, choose Application Management. On the top of the page, select Single Intelligent Agent Application. The application development page is displayed.
- Click the application to be debugged to go to the application details page.
- On the Prompt panel, write a prompt.
Using the Prompt Template
The platform provides Prompt Templates. You can write prompts by referring to the templates.
- On the prompt panel, click the Role Command Template icon to insert a prompt in the prompt text box.
Figure 1 Obtaining a prompt template
- After a prompt is used, the system automatically fills the selected prompt in the prompt text box. You can modify the prompt based on your service scenario. When modifying a prompt, pay attention to the hyphenated parts of the prompt. You need to add text content according to the blank guide of the editing block.
AI-generated Prompts
You can use natural language to tell AI what prompts you want to write or optimize. The LLM will automatically generate prompts based on your description.
- In the text box of the prompt panel, enter a prompt, for example, "You are an intelligent customer service assistant."
- On the Prompt panel, click Figure 3 Prompt optimization. The Prompt optimization dialog box is displayed, showing the prompts generated by AI-based automatic optimization.
- After you click OK, the prompt word is filled in the app prompt word editing box. You can also optimize the prompt word generated by AI.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
