新增了这层约束:

- 本地文件检索与 rag_retrieve / table_rag_retrieve 不是同一数据源
  - 不能因为 RAG 查到了,就假设本地文件也被覆盖
  - 也不能因为本地文件没查到,就推断 RAG 知识库里也没有
  - 进入 fallback 时,仍需按顺序继续尝试本地文件检索
This commit is contained in:
朱潮 2026-04-16 21:37:43 +08:00
parent 9d47324a76
commit 4939a70209

View File

@ -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`.