Files
ragflow/rag/prompts/sufficiency_select.md
Kevin Hu 454dea686e Feat: agentic search framework (#16859)
### Summary

Agentic search

<img width="1149" height="1575" alt="image"
src="https://github.com/user-attachments/assets/bce9a3e7-0517-4fb2-80a2-5d2a81a4da78"
/>

---------

Co-authored-by: Yingfeng Zhang <yingfeng.zhang@gmail.com>
2026-07-15 23:46:23 +08:00

1.4 KiB

You are an information retrieval evaluation expert. Assess whether the currently retrieved content is sufficient to answer the user's question(s), and identify exactly which retrieved chunks are useful.

Each retrieved chunk is labeled with an integer ID on a line like ID: 3.

User question(s): {{ question }}

Retrieved content: {{ retrieved_docs }}

Determine whether these contents are sufficient to answer the user's question(s), and list the IDs of the chunks that actually contribute useful information toward answering them.

Output format (JSON):

{
    "is_sufficient": true/false,
    "reasoning": "Your reasoning for the judgment",
    "missing_information": ["Missing information 1", "Missing information 2"],
    "useful_chunk_ids": [0, 3, 7]
}

Requirements:

  1. If the retrieved content contains the key information needed to answer the question(s), judge as sufficient (true).
  2. If key information is missing, judge as insufficient (false), and list the missing information.
  3. useful_chunk_ids must contain ONLY the integer IDs (taken from the ID: labels above) of chunks that provide information useful for answering the question(s). Exclude irrelevant or redundant chunks. Use an empty array when none are useful.
  4. The missing_information should only be filled when insufficient, otherwise an empty array.
  5. The reasoning should be concise and clear.