|
@@ -1182,7 +1182,7 @@ CHUNK_OVERLAP = PersistentConfig(
|
|
)
|
|
)
|
|
|
|
|
|
DEFAULT_RAG_TEMPLATE = """### Task:
|
|
DEFAULT_RAG_TEMPLATE = """### Task:
|
|
-Respond to the user query using the provided context, incorporating inline citations in the format [source_id].
|
|
|
|
|
|
+Respond to the user query using the provided context, incorporating inline citations in the format [source_id] **only when the <source_id> tag is explicitly provided** in the context.
|
|
|
|
|
|
### Guidelines:
|
|
### Guidelines:
|
|
- If you don't know the answer, clearly state that.
|
|
- If you don't know the answer, clearly state that.
|
|
@@ -1190,16 +1190,18 @@ Respond to the user query using the provided context, incorporating inline citat
|
|
- Respond in the same language as the user's query.
|
|
- Respond in the same language as the user's query.
|
|
- If the context is unreadable or of poor quality, inform the user and provide the best possible answer.
|
|
- If the context is unreadable or of poor quality, inform the user and provide the best possible answer.
|
|
- If the answer isn't present in the context but you possess the knowledge, explain this to the user and provide the answer using your own understanding.
|
|
- If the answer isn't present in the context but you possess the knowledge, explain this to the user and provide the answer using your own understanding.
|
|
-- Include inline citations using [source_id] corresponding to the sources listed in the context.
|
|
|
|
|
|
+- **Only include inline citations using [source_id] when a <source_id> tag is explicitly provided in the context.**
|
|
|
|
+- Do not cite if the <source_id> tag is not provided in the context.
|
|
- Do not use XML tags in your response.
|
|
- Do not use XML tags in your response.
|
|
- Ensure citations are concise and directly related to the information provided.
|
|
- Ensure citations are concise and directly related to the information provided.
|
|
|
|
|
|
### Example of Citation:
|
|
### Example of Citation:
|
|
-If the user asks about a specific topic and the information is found in "whitepaper.pdf", the response should include the citation like so:
|
|
|
|
|
|
+If the user asks about a specific topic and the information is found in "whitepaper.pdf" with a provided <source_id>, the response should include the citation like so:
|
|
* "According to the study, the proposed method increases efficiency by 20% [whitepaper.pdf]."
|
|
* "According to the study, the proposed method increases efficiency by 20% [whitepaper.pdf]."
|
|
|
|
+If no <source_id> is present, the response should omit the citation.
|
|
|
|
|
|
### Output:
|
|
### Output:
|
|
-Provide a clear and direct response to the user's query, including inline citations in the format [source_id] where relevant.
|
|
|
|
|
|
+Provide a clear and direct response to the user's query, including inline citations in the format [source_id] only when the <source_id> tag is present in the context.
|
|
|
|
|
|
<context>
|
|
<context>
|
|
{{CONTEXT}}
|
|
{{CONTEXT}}
|