Instruction Following and Reliability Evaluation for Multi-Turn Retrieval Tasks in LLM Agents
This article examines how to evaluate instruction following and reliability in multi-turn retrieval tasks performed by LLM agents. It identifies common failure modes such as call-count drift, reused results presented as new evidence, self-report and execution mismatches, constraint contamination, render-layer and logic-layer misalignment, common-sense physics and rule errors, and demo results disconnected from training. It also presents a six-dimension evaluation rubric, log-based automated checks, and practical testing recommendations for reproducible assessment.
1. Background
Large models are moving from single-turn question answering toward agentic forms that call tools. A model must decide how many retrievals to perform, how to cite results, when to stop, and how to report its process in the final answer. The reliability of this capability is difficult to judge from subjective experience. A good demonstration does not mean the model can reliably execute the same instruction.
In practical testing, common problems cluster into three scenarios:
- Instruction execution: The user requires a fixed number of retrievals or a fixed output format, but the model’s actual execution count does not match the requirement.
- Information verification: The content cited by the model is inconsistent with retrieval results, or the model reuses old results as new evidence.
- Generation and rendering: The code output by the model can run, but the interface layout, physical parameters, or state synchronization contain obvious errors.
These three types of problems share a common feature: the process description given by the model may not match the actual execution trace. Therefore, evaluation should rely on observable logs and artifacts.
2. Common Failure Modes
1. Call-count drift
When N retrievals are required, the model may perform fewer than N or more than N. Some models claim in the response body that they completed more rounds, but the logs show only one call. This deviation directly affects the comparability of results.
2. Result reuse presented as new evidence
The content returned in later rounds is exactly the same as in the first round, but the model lists it as independent evidence. The criterion is whether the result identifiers returned in each round overlap with the previous set.
3. Self-report and execution mismatch
The model says “three retrievals have been completed,” but the logs show only one. This problem is more common in long tasks. The claimed number should be compared item by item with the log count.
4. Constraint item contamination
When the model is required to use only items within a certain range, it may mix in similar content that does not belong to that range. This type of error is especially harmful in configuration and parameter tasks because downstream systems often use these values directly.
5. Render-layer and logic-layer misalignment
Coordinates and states in the logic layer are inconsistent with what the render layer displays. This often appears as oversized characters, layout offset, or data desynchronization between the two layers. The inspection method is to output the logic state and rendering screenshot separately and compare them item by item.
6. Common-sense physics and rule errors
For example, the pin spacing in a bowling game is far smaller than the standard size, causing strike detection to fail. Such errors indicate that the model has insufficient modeling of basic physics and game rules. Explicit numerical validation should be added to tests.
7. Demo effects disconnected from training results
A “convergence curve” or “optimal policy” shown in the interface does not necessarily come from a real training process. Evaluation should require training logs and random seeds, and rerun under multiple seeds.
3. Evaluation Dimension Design
It is recommended to build a scoring table from the following six dimensions:
| Dimension | Basis for judgment | Pass criterion |
|---|---|---|
| Instruction following | Difference between retrieval count and requirement | Exact match |
| Evidence traceability | Result identifiers for each round | No cross-round duplicates counted as new evidence |
| Self-report consistency | Numbers in the response body and log counts | Item-by-item match |
| Scope constraints | Conclusion items and whitelist | No out-of-scope items |
| Functional completeness | Whether the program can start, interact, and reset | All available |
| Numerical plausibility | Key parameters and common-sense ranges | Within a reasonable range |
Each dimension should be scored independently to avoid letting an overall impression override individual defects.
4. Automated Check Examples
The following code demonstrates how to use logs for checks. The data structure is illustrative; actual fields should be adjusted according to the log format of the platform in use.
from dataclasses import dataclass@dataclassclass SearchEvent:query: strresult_ids: list[str]def check_search_budget(events, required):"""Check whether the actual retrieval count matches the requirement."""actual = len(events)return {"required": required, "actual": actual, "pass": actual == required}def check_result_reuse(events):"""Count rounds whose result set is fully contained in previous rounds, i.e., reused rounds."""seen = set()reused = 0for e in events:ids = set(e.result_ids)if ids and ids <= seen:reused += 1seen |= idsreturn {"reused_rounds": reused, "pass": reused == 0}def check_claim_consistency(claimed_count, events):"""Compare the claimed retrieval count in the response body with the log count."""actual = len(events)return {"claimed": claimed_count, "actual": actual, "pass": claimed_count == actual}def check_whitelist(answer_items, whitelist):"""Check whether all conclusion items are within the allowed range."""illegal = [x for x in answer_items if x not in whitelist]return {"illegal": illegal, "pass": not illegal}
During execution, random seeds should be fixed, the complete call sequence should be recorded, and the raw logs of each test should be archived. In this way, the same conclusion can be reproduced by others.
5. Practical Recommendations
- Run each task at least three times and compare the variance of the results. A single result has no statistical significance.
- Score the “execution process” and the “final answer” separately. Even if the result happens to be correct, process errors should still be penalized.
- For whitelist tasks, list the allowed items in advance and freeze them before testing. Adding to the whitelist afterward weakens the objectivity of the test.
- For rendering tasks, save the code, runtime screenshot, and logic state snapshot at the same time. None of the three should be omitted.
- For numerical conclusions, set common-sense ranges. Values outside the range should be marked as errors directly, without manual item-by-item judgment.
6. Conclusion
The reliability of LLM agents is determined jointly by execution consistency, evidence authenticity, and output constraints. Subjective experience alone makes it difficult to detect hidden errors such as “wrong count,” “reused results,” and “mixed-in irrelevant items.” Structured evaluation based on logs can turn these problems into countable and reproducible metrics, and it also makes it easier to compare the improvement of different model versions.
