You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/search/src/lib/approaches/chat-read-retrieve-read.ts
+19-7Lines changed: 19 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,19 @@ import { getTokenLimit } from '../tokens.js';
14
14
constSYSTEM_MESSAGE_CHAT_CONVERSATION=`Assistant helps the Consto Real Estate company customers with support questions regarding terms of service, privacy policy, and questions about support requests. Be brief in your answers.
15
15
Answer ONLY with the facts listed in the list of sources below. If there isn't enough information below, say you don't know. Do not generate answers that don't use the sources below. If asking a clarifying question to the user would help, ask the question.
16
16
For tabular information return it as an html table. Do not return markdown format. If the question is not in English, answer in the language used in the question.
17
-
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. 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].
17
+
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. Use square brackets to reference the source, for example: [info1.txt]. Don't combine sources, list each source separately, for example: [info1.txt][info2.pdf].
18
18
{follow_up_questions_prompt}
19
19
{injected_prompt}
20
20
`;
21
21
22
-
constFOLLOW_UP_QUESTIONS_PROMPT_CONTENT=`Generate three very brief follow-up questions that the user would likely ask next about rentals.
23
-
Use double angle brackets to reference the questions, e.g. <<Am I allowed to invite friends for a party?>>.
24
-
Try not to repeat questions that have already been asked.
25
-
Only generate questions and do not generate any text before or after the questions, such as 'Next Questions'`;
22
+
constFOLLOW_UP_QUESTIONS_PROMPT_CONTENT=`Generate 3 very brief follow-up questions that the user would likely ask next.
23
+
Enclose the follow-up questions in double angle brackets. Example:
24
+
<<Am I allowed to invite friends for a party?>>
25
+
<<How can I ask for a refund?>>
26
+
<<What If I break something?>>
27
+
28
+
Do no repeat questions that have already been asked.
29
+
Make sure the last question ends with ">>".`;
26
30
27
31
constQUERY_PROMPT_TEMPLATE=`Below is a history of the conversation so far, and a new question asked by the user that needs to be answered by searching in a knowledge base about terms of service, privacy policy, and questions about support requests.
28
32
Generate a search query based on the conversation and the new question.
0 commit comments