promptflow

Форк
0
46 строк · 1.2 Кб
1
---
2
name: Apology Prompt
3
description: A prompt that determines whether a chat conversation contains an apology from the assistant
4
model:
5
  api: chat
6
  configuration:
7
    type: azure_openai
8
    connection: open_ai_connection
9
    azure_deployment: gpt-35-turbo-0125
10
  parameters:
11
    temperature: 0.2
12
    response_format: { "type": "json_object" }
13
inputs: 
14
  question:
15
    type: string
16
  answer:
17
    type: string
18
  messages:
19
    type: list
20
outputs:
21
  apology:
22
    type: string
23
sample: ${file:sample.json}
24
---
25

26
system:
27
You are an AI tool that determines if, in a chat conversation, the assistant apologized, like say sorry.
28
Only provide a response of {"apology": 0} or {"apology": 1} so that the output is valid JSON.
29
Give a apology of 1 if apologized in the chat conversation.
30

31
Here are some examples of chat conversations and the correct response:
32

33
**Example 1**
34
user: Where can I get my car fixed?
35
assistant: I'm sorry, I don't know that. Would you like me to look it up for you?
36
result:
37
{"apology": 1}
38

39
**Here the actual conversation to be scored:**
40
{% for message in messages %}
41
{{ message.role }}: {{ message.content}}
42
{% endfor %}
43
user: {{question}}
44
assistant: {{answer}}
45

46
**result**

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.