From a8cc85c8efa4ca301029364377b097a0bfcf7430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Sun, 19 Apr 2026 14:14:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20Image=20Handling=20?= =?UTF-8?q?=E7=AB=A0=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../support/rag-retrieve/hooks/retrieval-policy.md | 13 +++++++++++-- .../rag-retrieve-only/hooks/retrieval-policy.md | 10 +++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/skills/autoload/support/rag-retrieve/hooks/retrieval-policy.md b/skills/autoload/support/rag-retrieve/hooks/retrieval-policy.md index 5ef9572..525bbbe 100644 --- a/skills/autoload/support/rag-retrieve/hooks/retrieval-policy.md +++ b/skills/autoload/support/rag-retrieve/hooks/retrieval-policy.md @@ -64,13 +64,22 @@ On insufficient results, follow this sequence: - If truncated: tell user total (`N+M`), displayed (`N`), omitted (`M`). - Cite sources using filenames from `file_ref_table`. -## 8. Citation Requirements +## 8. Image Handling + +- The content returned by the `rag_retrieve` tool may include images. +- Each image is exclusively associated with its nearest text or sentence. +- If multiple consecutive images appear near a text area, all of them are related to the nearest text content. +- Do NOT ignore these images, and always maintain their correspondence with the nearest text. +- Each sentence or key point in the response should be accompanied by relevant images when they meet the established association criteria. +- Avoid placing all images at the end of the response. + +## 9. Citation Requirements - MUST generate `` tags when using retrieval results. - Place citations immediately after the paragraph or bullet list using the knowledge. Do NOT collect at end. - 1-2 citations per paragraph/bullet. At least 1 citation when using retrieved knowledge. -## 9. Pre-Reply Self-Check +## 10. Pre-Reply Self-Check Before replying to a knowledge retrieval task, verify: - Used only whitelisted retrieval tools — no local filesystem inspection? diff --git a/skills/onprem/rag-retrieve-only/hooks/retrieval-policy.md b/skills/onprem/rag-retrieve-only/hooks/retrieval-policy.md index 09732b7..cc2fe86 100644 --- a/skills/onprem/rag-retrieve-only/hooks/retrieval-policy.md +++ b/skills/onprem/rag-retrieve-only/hooks/retrieval-policy.md @@ -22,7 +22,15 @@ - If the result is insufficient, retry `rag_retrieve` with a better rewritten query or a larger `top_k`. - Only say no relevant information was found after `rag_retrieve` has been tried and still provides insufficient evidence. -## 4.Citation Requirements for Retrieved Knowledge +## 4.Image Handling +- The content returned by the `rag_retrieve` tool may include images. +- Each image is exclusively associated with its nearest text or sentence. +- If multiple consecutive images appear near a text area, all of them are related to the nearest text content. +- Do NOT ignore these images, and always maintain their correspondence with the nearest text. +- Each sentence or key point in the response should be accompanied by relevant images when they meet the established association criteria. +- Avoid placing all images at the end of the response. + +## 5.Citation Requirements for Retrieved Knowledge - When using knowledge from `rag_retrieve`, you MUST generate `` tags. - Follow the citation format returned by each tool. - Place citations immediately after the paragraph or bullet list that uses the knowledge.