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: api/pkg/prompts/templates/knowledge.tmpl
+60-8
Original file line number
Diff line number
Diff line change
@@ -11,21 +11,47 @@ We have found the following context you may refer to in your answer:
11
11
</article>
12
12
{{- end }}
13
13
14
-
Always provide references in the body of your answer in the format '[DOC_ID:DocumentID]'. For example, "The answer is 42 [DOC_ID:f6962c8007]."
14
+
IMPORTANT: When referencing documents, always use EXACTLY the document_id values provided above. DO NOT extract or use page IDs from URLs within the content. Always provide references in the body of your answer in the format '[DOC_ID:DocumentID]'. For example, "The answer is 42 [DOC_ID:f6962c8007]." NOT "[DOC_ID:123456]" where 123456 might be a page ID in a URL.
15
15
16
16
Always provide references in the body of your answer!
17
17
18
-
After your answer, include one excerpt per document_id in XML format surrounded by three dashes like ---. These should be short sentence-long excerpts from the content that you referenced when answering the question, in the form below. Provide one excerpt per document. Provide one EXACT QUOTE per document. Do not include any other text inside the --- markers.
18
+
After completing your answer, create an excerpt section with important quotes from each referenced document.
19
+
20
+
Follow these steps:
21
+
1. Identify each unique document_id you cited in your answer
22
+
2. For each document, select a representative quote (1-2 sentences) that best supports your answer
23
+
3. Include each document exactly once in the excerpt block using the format below
<snippet>A key quote from this document that supports your answer.</snippet>
25
46
</excerpt>
26
47
</excerpts>
27
48
---
28
49
50
+
FINAL CHECK:
51
+
- Each document appears exactly once in your excerpts
52
+
- No introductory text appears before the excerpt block
53
+
- All document_ids match those you cited in your answer
54
+
29
55
{{- end }}
30
56
31
57
{{- if .KnowledgeResults }}
@@ -53,21 +79,47 @@ We have found the following context you may refer to in your answer:
53
79
</article>
54
80
{{- end }}
55
81
56
-
Always provide references in the body of your answer in the format '[DOC_ID:DocumentID]'. For example, "The answer is 42 [DOC_ID:f6962c8007]."
82
+
IMPORTANT: When referencing documents, always use EXACTLY the document_id values provided above. DO NOT extract or use page IDs from URLs within the content. Always provide references in the body of your answer in the format '[DOC_ID:DocumentID]'. For example, "The answer is 42 [DOC_ID:f6962c8007]." NOT "[DOC_ID:123456]" where 123456 might be a page ID in a URL.
57
83
58
84
Always provide references in the body of your answer!
59
85
60
-
After your answer, include one excerpt per document_id in XML format surrounded by three dashes like ---. These should be short sentence-long excerpts from the content that you referenced when answering the question, in the form below. Provide one excerpt per document. Provide one EXACT QUOTE per document. Do not include any other text inside the --- markers.
86
+
After completing your answer, create an excerpt section with important quotes from each referenced document.
87
+
88
+
Follow these steps:
89
+
1. Identify each unique document_id you cited in your answer
90
+
2. For each document, select a representative quote (1-2 sentences) that best supports your answer
91
+
3. Include each document exactly once in the excerpt block using the format below
0 commit comments