From 4939a702092d8fb1a2cac9abef1ef69cf48115df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=BD=AE?= Date: Thu, 16 Apr 2026 21:37:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=86=E8=BF=99=E5=B1=82?= =?UTF-8?q?=E7=BA=A6=E6=9D=9F=EF=BC=9A=20=20=20-=20=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=A3=80=E7=B4=A2=E4=B8=8E=20rag=5Fretrieve?= =?UTF-8?q?=20/=20table=5Frag=5Fretrieve=20=E4=B8=8D=E6=98=AF=E5=90=8C?= =?UTF-8?q?=E4=B8=80=E6=95=B0=E6=8D=AE=E6=BA=90=20=20=20-=20=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=9B=A0=E4=B8=BA=20RAG=20=E6=9F=A5=E5=88=B0=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E5=B0=B1=E5=81=87=E8=AE=BE=E6=9C=AC=E5=9C=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B9=9F=E8=A2=AB=E8=A6=86=E7=9B=96=20=20=20-=20?= =?UTF-8?q?=E4=B9=9F=E4=B8=8D=E8=83=BD=E5=9B=A0=E4=B8=BA=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=B2=A1=E6=9F=A5=E5=88=B0=EF=BC=8C=E5=B0=B1?= =?UTF-8?q?=E6=8E=A8=E6=96=AD=20RAG=20=E7=9F=A5=E8=AF=86=E5=BA=93=E9=87=8C?= =?UTF-8?q?=E4=B9=9F=E6=B2=A1=E6=9C=89=20=20=20-=20=E8=BF=9B=E5=85=A5=20fa?= =?UTF-8?q?llback=20=E6=97=B6=EF=BC=8C=E4=BB=8D=E9=9C=80=E6=8C=89=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=E7=BB=A7=E7=BB=AD=E5=B0=9D=E8=AF=95=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=A3=80=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skills_autoload/rag-retrieve/hooks/retrieval-policy.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/skills_autoload/rag-retrieve/hooks/retrieval-policy.md b/skills_autoload/rag-retrieve/hooks/retrieval-policy.md index 6527185..fce1bfc 100644 --- a/skills_autoload/rag-retrieve/hooks/retrieval-policy.md +++ b/skills_autoload/rag-retrieve/hooks/retrieval-policy.md @@ -3,6 +3,7 @@ ### 1. Retrieval Order and Tool Selection - Follow this section for source choice, tool choice, query rewrite, `top_k`, fallback, result handling, and citations. - Use this default retrieval order and execute it sequentially: skill-enabled knowledge retrieval tools > `rag_retrieve` / `table_rag_retrieve` > local filesystem retrieval. +- Important: local filesystem retrieval and `rag_retrieve` / `table_rag_retrieve` do NOT share the same underlying data source. They are not equivalent, and one source cannot be used to assume coverage in the other. - Do NOT answer from model knowledge first. - Do NOT skip directly to local filesystem retrieval when an earlier retrieval source may answer the question. - When a suitable skill-enabled knowledge retrieval tool is available, use it first. @@ -32,6 +33,9 @@ ### 5. Fallback and Sequential Retry - If the first retrieval result is insufficient, call the next retrieval source in the default order before replying. +- Important: local filesystem retrieval and `rag_retrieve` / `table_rag_retrieve` do NOT share the same underlying data source. They are not equivalent, and results from one cannot be used to assume coverage in the other. +- Even if `rag_retrieve` or `table_rag_retrieve` returns relevant results, local filesystem retrieval may still contain different or additional information; likewise, local files may contain information absent from the RAG knowledge base. +- Therefore, when fallback is required, do NOT skip local filesystem retrieval on the assumption that RAG already covers the same documents, and do NOT treat a local-file miss as evidence that the RAG knowledge base also lacks the information. - If the first RAG tool is insufficient, call the other RAG tool next before moving to local filesystem retrieval. - If `table_rag_retrieve` is insufficient or empty, continue with `rag_retrieve`. - If `rag_retrieve` is insufficient or empty, continue with `table_rag_retrieve`.