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
Introduces an AI mode setting to both backend and frontend, allowing users to choose between 'Data Only', 'OpenAI Only', or 'Data + OpenAI' for search and answer generation. Backend approaches now handle the ai_mode override, updating prompt instructions and bypassing document search for OpenAI-only mode. Frontend includes a new AIModeSettings component, updates settings and API models, and passes the selected mode to backend requests. Also updates prompt templates to conditionally include AI mode instructions. Infrastructure defaults for GPT models are updated to use gpt-4o and new deployment versions.
"data_only": "IMPORTANT: Only use information from the provided documents. Do not use external knowledge or general information that isn't contained in the source documents.",
99
+
"openai_only": "Use your general knowledge and reasoning capabilities. No document search results are provided.",
100
+
"data_and_openai": "Use both the provided documents and your general knowledge to provide comprehensive answers."
Copy file name to clipboardExpand all lines: app/backend/approaches/prompts/chat_answer_question.prompty
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,13 +20,23 @@ system:
20
20
{% if override_prompt %}
21
21
{{ override_prompt }}
22
22
{% else %}
23
+
{% if ai_mode_instruction %}
24
+
{{ ai_mode_instruction }}
25
+
{% else %}
23
26
Assistant helps the company employees with their healthcare plan questions, and questions about the employee handbook. Be brief in your answers.
24
27
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.
28
+
{% endif %}
25
29
If the question is not in English, answer in the language used in the question.
30
+
{% if text_sources and text_sources|length > 0 %}
26
31
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].
32
+
{% endif %}
27
33
{{ injected_prompt }}
28
34
{% endif %}
29
35
36
+
{% if ai_mode_instruction %}
37
+
{{ ai_mode_instruction }}
38
+
{% endif %}
39
+
30
40
{% if include_follow_up_questions %}
31
41
Generate 3 very brief follow-up questions that the user would likely ask next.
32
42
Enclose the follow-up questions in double angle brackets. Example:
@@ -45,7 +55,9 @@ Make sure the last question ends with ">>".
"data_only": "IMPORTANT: Only use information from the provided documents. Do not use external knowledge or general information that isn't contained in the source documents.",
89
+
"openai_only": "Use your general knowledge and reasoning capabilities. No document search results are provided.",
90
+
"data_and_openai": "Use both the provided documents and your general knowledge to provide comprehensive answers."
0 commit comments