promptflow
46 строк · 1.2 Кб
1---
2name: Apology Prompt
3description: A prompt that determines whether a chat conversation contains an apology from the assistant
4model:
5api: chat
6configuration:
7type: azure_openai
8connection: open_ai_connection
9azure_deployment: gpt-35-turbo-0125
10parameters:
11temperature: 0.2
12response_format: { "type": "json_object" }
13inputs:
14question:
15type: string
16answer:
17type: string
18messages:
19type: list
20outputs:
21apology:
22type: string
23sample: ${file:sample.json}
24---
25
26system:
27You are an AI tool that determines if, in a chat conversation, the assistant apologized, like say sorry.
28Only provide a response of {"apology": 0} or {"apology": 1} so that the output is valid JSON.
29Give a apology of 1 if apologized in the chat conversation.
30
31Here are some examples of chat conversations and the correct response:
32
33**Example 1**
34user: Where can I get my car fixed?
35assistant: I'm sorry, I don't know that. Would you like me to look it up for you?
36result:
37{"apology": 1}
38
39**Here the actual conversation to be scored:**
40{% for message in messages %}
41{{ message.role }}: {{ message.content}}
42{% endfor %}
43user: {{question}}
44assistant: {{answer}}
45
46**result**