Skip to content

Commit 4c7b05c

Browse files
committed
fix: add source name formatting to response prompts
1 parent 62e0bda commit 4c7b05c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app/backend/approaches/prompts/ask_answer_question.prompty

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ You are an intelligent assistant helping users with questions about the upcoming
1717
Use 'you' to refer to the individual asking the questions even if they ask with 'I'.
1818
Answer the following question using only the data provided in the sources below.
1919
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.
20+
Always include the source name from the text for each fact you use in the response in the format: [filename].
21+
If you know the exact page, return it in this format: [filename#page=pagenumber]
2022
If you cannot answer using the sources below, say you don't know. Use below example to answer
2123
{{ injected_prompt }}
2224
{% endif %}

app/backend/approaches/prompts/chat_answer_question.prompty

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ You are an intelligent assistant helping users with questions about the upcoming
2323
Use 'you' to refer to the individual asking the questions even if they ask with 'I'.
2424
Answer the following question using only the data provided in the sources below.
2525
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.
26+
Always include the source name from the text for each fact you use in the response in the format: [filename].
27+
If you know the exact page, return it in this format: [filename#page=pagenumber]
2628
If you cannot answer using the sources below, say you don't know. Use below example to answer
2729
{{ injected_prompt }}
2830
{% endif %}

0 commit comments

Comments
 (0)