Adapt rag SKILL.md in order to improve citation rate
This commit is contained in:
parent
b0256b3648
commit
5f08a2a8ae
1 changed files with 6 additions and 4 deletions
|
|
@ -26,15 +26,17 @@ List available documents in the knowledge base. Use when the user wants to brows
|
||||||
Retrieve a document by ID, title, or URI. Partial matches work. Use when the user wants the full content of a specific document.
|
Retrieve a document by ID, title, or URI. Partial matches work. Use when the user wants the full content of a specific document.
|
||||||
|
|
||||||
### cite
|
### cite
|
||||||
Register chunk IDs as citations for your answer. Call this AFTER formulating your answer, with the `chunk_id` values from search results that support it.
|
Register the chunk IDs that ground your answer. Call this BEFORE writing your final answer, with the `chunk_id` values from search results that support each claim. Every answer that uses search results must be backed by `cite`.
|
||||||
|
|
||||||
## How to answer questions
|
## How to answer questions
|
||||||
|
|
||||||
1. Call `search` with relevant keywords from the question
|
1. Call `search` with relevant keywords from the question
|
||||||
2. Review the results — they are ordered by relevance (rank 1 = best match)
|
2. Review the results — they are ordered by relevance (rank 1 = best match)
|
||||||
3. If needed, search again with different keywords (you have a limited number of searches)
|
3. If needed, search again with different keywords (you have a limited number of searches)
|
||||||
4. Synthesize a concise answer based strictly on the retrieved content
|
4. Identify the chunk IDs that support your answer and call `cite` with them
|
||||||
5. Call `cite` with the chunk IDs of search results that informed your answer
|
5. Then write a concise answer based strictly on the cited content
|
||||||
|
|
||||||
|
You MUST call `cite` with at least one chunk ID before producing your final answer, **unless** you are refusing for lack of information (see below). Answers without citations are considered ungrounded.
|
||||||
|
|
||||||
## Guidelines
|
## Guidelines
|
||||||
|
|
||||||
|
|
@ -43,7 +45,7 @@ Register chunk IDs as citations for your answer. Call this AFTER formulating you
|
||||||
- If multiple results are relevant, synthesize them coherently
|
- If multiple results are relevant, synthesize them coherently
|
||||||
- Be concise and direct — avoid elaboration unless asked
|
- Be concise and direct — avoid elaboration unless asked
|
||||||
- If the search tool tells you the search limit is reached, stop searching and answer with what you have
|
- If the search tool tells you the search limit is reached, stop searching and answer with what you have
|
||||||
- If the retrieved documents do not directly address the question, say: "I cannot find enough information in the knowledge base to answer this question." Do not guess or infer from tangentially related content.
|
- If the retrieved documents do not directly address the question, say: "I cannot find enough information in the knowledge base to answer this question." Do not guess or infer from tangentially related content. In this refusal case do **not** call `cite` — there is nothing to cite.
|
||||||
- Do NOT include chunk IDs or UUIDs in your answer text — your answer should read naturally. Use the `cite` tool separately to register citations.
|
- Do NOT include chunk IDs or UUIDs in your answer text — your answer should read naturally. Use the `cite` tool separately to register citations.
|
||||||
|
|
||||||
## When the user mentions a specific document
|
## When the user mentions a specific document
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue