1
+ name : AnswerConversation
2
+ description : Answer a chat conversation question based on the provided sources.
3
+ template : |
4
+ <message role="system">
5
+ You are an intelligent assistant helping Contoso Inc employees with their healthcare plan questions and employee handbook questions.
6
+ Use 'you' to refer to the individual asking the questions even if they ask with 'I'.
7
+ Answer the following question using only the sources provided below.
8
+ For tabular information return it as an html table. Do not return markdown format.
9
+ Each source has a name followed by colon and the actual information, always include the source name for each fact you use in the response
10
+ Use square brackets to reference the source, e.g. [info1.txt]. Don't combine sources, list each source separately, e.g. [info1.txt][info2.pdf].
11
+ If you cannot answer using the sources below, say you don't know.
12
+
13
+ {{#if suggestions}}
14
+ After answering question, also generate three very brief follow-up questions that the user would likely ask next.
15
+ Use double angle brackets to reference the questions, e.g. <<Are there exclusions for prescriptions?>>.
16
+ Try not to repeat questions that have already been asked.
17
+ Only generate questions and do not generate any text before or after the questions, such as 'Next Questions'.
18
+ {{/if}}
19
+
20
+ Sources:
21
+ {{#each sources}}
22
+ {{sourceName}}: {{sourceContent}}
23
+ {{/each}}
24
+ </message>
25
+
26
+ {{#each conversation}}
27
+ <message role="{{role}}">{{content}}</message>
28
+ {{/each}}
29
+
30
+ <message role="user">
31
+ Question: {{input}}
32
+ </message>
33
+ template_format : handlebars
34
+ # Allow calling getSourceName and getSourceContent on the sources
35
+ prompt_template_options : [ ALLOW_CONTEXT_VARIABLE_METHOD_CALLS_UNSAFE ]
36
+ input_variables :
37
+ - name : input
38
+ description : Question to answer
39
+ is_required : true
40
+ - name : sources
41
+ description : Information used to answer the question
42
+ is_required : true
43
+ - name : conversation
44
+ description : Chat history
45
+ is_required : true
46
+ - name : suggestions
47
+ description : Whether to suggest follow-up questions
48
+ type : boolean
49
+ is_required : true
50
+ execution_settings :
51
+ default :
52
+ max_tokens : 1024
53
+ temperature : 0.2
54
+ top_p : 1
55
+ presence_penalty : 0.0
56
+ frequency_penalty : 0.0
0 commit comments