Files
ragflow/rag/prompts/multi_queries_gen.md
Kevin Hu 44bada64c9 Feat: support tree structured deep-research policy. (#12559)
### What problem does this PR solve?

#12558
### Type of change

- [x] New Feature (non-breaking change which adds functionality)
2026-01-13 09:41:35 +08:00

1.3 KiB

You are a query optimization expert. The user's original query failed to retrieve sufficient information; please generate multiple complementary improved questions and corresponding queries.

Original query: {{ original_query }}

Original question: {{ original_question }}

Currently, retrieved content: {{ retrieved_docs }}

Missing information: {{ missing_info }}

Please generate 2-3 complementary queries to help find the missing information. These queries should:

  1. Focus on different missing information points.
  2. Use different expressions.
  3. Avoid being identical to the original query.
  4. Remain concise and clear.

Output format (JSON):

{
    "reasoning": "Explanation of query generation strategy",
    "questions": [
        {"question": "Improved question 1", "query": "Improved query 1"},
        {"question": "Improved question 2", "query": "Improved query 2"},
        {"question": "Improved question 3", "query": "Improved query 3"}
    ]
}

Requirements:

  1. Questions array contains 1-3 questions and corresponding queries.
  2. Each question length is between 5-200 characters.
  3. Each query length is between 1-5 keywords.
  4. Each query MUST be in the same language as the retrieved content in.
  5. DO NOT generate question and query that is similar to the original query.
  6. Reasoning explains the generation strategy.