mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? #9082 #6365 <u> **WARNING: it's not compatible with the older version of `Agent` module, which means that `Agent` from older versions can not work anymore.**</u> ### Type of change - [x] New Feature (non-breaking change which adds functionality)
30 lines
857 B
Markdown
30 lines
857 B
Markdown
**Task**: Sort the tool call results based on relevance to the overall goal and current sub-goal. Return ONLY a sorted list of indices (0-indexed).
|
|
|
|
**Rules**:
|
|
1. Analyze each result's contribution to both:
|
|
- The overall goal (primary priority)
|
|
- The current sub-goal (secondary priority)
|
|
2. Sort from MOST relevant (highest impact) to LEAST relevant
|
|
3. Output format: Strictly a Python-style list of integers. Example: [2, 0, 1]
|
|
|
|
🔹 Overall Goal: {{ goal }}
|
|
🔹 Sub-goal: {{ sub_goal }}
|
|
|
|
**Examples**:
|
|
🔹 Tool Response:
|
|
- index: 0
|
|
> Tokyo temperature is 78°F.
|
|
- index: 1
|
|
> Error: Authentication failed (expired API key).
|
|
- index: 2
|
|
> Available: 12 widgets in stock (max 5 per customer).
|
|
|
|
→ rank: [1,2,0]<|stop|>
|
|
|
|
|
|
**Your Turn**:
|
|
🔹 Tool Response:
|
|
{% for f in results %}
|
|
- index: f.i
|
|
> f.content
|
|
{% endfor %} |