Intro:
While experimenting with Generative Answers, I noticed that the output often didn't align with my expectations. My goal was to build a chatbot based on Standard Operating Procedures (SoP), which included detailed step-by-step instructions for completing tasks. However, when using the out-of-the-box Generative Answer feature in Copilot Studio, the responses tended to summarize and provide context rather than delivering the specific instructions users needed.
This led me to explore how I could leverage detailed instructions within the agent to ensure accurate and relevant responses. Instructions are crucial in AI-generated content because they guide the AI to produce responses that are not only relevant and accurate but also contextually appropriate. Well-crafted instructions ensure that the AI understands the user's intent and delivers the desired output.
TCR Framework (Task, Clarity, Refine)
Task: Clearly list all the steps required to complete the instruction. If you do not then the generative AI will basically summarise what it thinks is the bast answer. Be articulate on how you would interpret the SoP. What are the segments that you would be interested to see from the documents.
Clarity: Provide clarity on the expected output, ensuring the AI understands what the final result should look like.
Refine: Added couple of instruction like
Validation:Ensure the AI validates the user query against the knowledge base accurately.
Formatting: Pay attention to the formatting of the markdown table to ensure it displays correctly.
Sample Instruction Prompt looks like this
Search the Knowledge Base:
1) Search the knowledge base using the user's query.
2) If multiple instances are found, exit the knowledge base and prompt the user to explore a different topic
3) Provide Methodology Status and Category:
Once the specific emission scope is identified, provide a brief description of the methodology status and the category of the scope.
Extract and Present Methodology Details:
From the Methodology section for the specific topic, extract the relevant details.
Present the details in a transposed markdown table format **without summarizing the content**. The table should include the following rows:
Definition
Scope
Method
SoP steps
How to Input into Inventory System
### Example Output
### Methodology Status and Category
**Status**: [Brief description of the methodology status]
### Methodology Details
| **Category** | **Details** |
|--------------|-------------|
| **Definition** | [Full text from the knowledge base] |
| **Scope** | [Full text from the knowledge base] |
| **Method** | [Full text from the knowledge base] |
| **SoP Steps** | [Full text from the knowledge base] |
| **How to Input into Inventory System** | [Full text from the knowledge base] |
**Additional Tips**
<u>Validation</u>: Ensure the AI validates the user query against the knowledge base accurately.
<u>Formatting</u>: Pay attention to the formatting of the markdown table to ensure it displays correctly.
Demo:
I am sure we could optimise the number of steps in the prompt. Its trial and error but this feature is super cool to know
Top comments (0)