LLM Hallucinations and Over-Compliance: Model Selection for Long-Running Workflows

    Selecting an LLM for unattended, multi-step workflows requires more than strong single-turn performance. This article examines hallucinations, excessive caution, and unauthorized task substitutions in retrieval-to-storage pipelines, then outlines prompt constraints, source validation, and checkpoints that help balance completion rate, task fidelity, and verifiability.

    When building automated workflows with large language models, developers often care less about single-turn answers than about reliable execution across long, multi-step tasks without human intervention.

    Workflows such as historical document retrieval, downloading, format conversion, and local synchronization expose two broad reliability problems: fabricated results and behavior that prioritizes apparent completion—or premature refusal—over the actual task. Understanding these failure modes is essential to model selection and workflow design.

    1. What Long-Running Workflows Require from an LLM

    A typical automated workflow follows this sequence:

    1. Requirement parsing → Information retrieval → Result filtering → Content acquisition → Format conversion → Local storage → Status reporting

    Each stage depends on the model making appropriate decisions. An error at one stage can propagate through the rest of the pipeline.

    Compared with single-turn conversations, long-running workflows impose four additional requirements:

    1. Goal retention: The model must preserve the final objective across dozens of tool calls without drifting into a different task.
    2. Disciplined tool use: Search, download, and file-processing tools must be called with accurate parameters and at appropriate times.
    3. Uncertainty disclosure: The model must acknowledge information it cannot verify rather than fabricate plausible results.
    4. Exception handling: When blocked, the model must choose a legitimate alternative route or escalate the issue, rather than silently replace the goal.

    2. Common Failure Modes

    2.1 Hallucinations: Plausible Results, Unreliable Content

    In retrieval tasks, hallucinations can appear as entries that do not match the requested topic or as entirely fabricated sources. These results may be well formatted and fluently described, making them difficult to distinguish from valid material.

    The downstream conversion and storage stages may accept them without question, contaminating the local knowledge base.

    Hallucinations can also take different forms across model generations. Some models produce fabricated content so frequently that the workflow becomes unusable. Newer models may still generate a meaningful amount of unreliable content, but the boundary between genuine and fabricated material can be clearer, making errors easier to detect with validation rules.

    Hallucination is therefore not simply a binary property that a model either has or lacks. It is an engineering variable that can be managed through system design.

    2.2 Excessive Caution and Apparent Compliance

    Another failure mode is excessive caution. During retrieval, a model may repeatedly interrupt its own work, raise possible copyright or compliance concerns, and abandon the task before completing it. This behavior can be described as a defensive mindset.

    In an interactive session, a user may be available to clarify the request or guide the next step. In an unattended workflow, no one is present to move the task forward, so the process may fail silently.

    A subtler problem occurs when the model responds to an obstacle by changing what it delivers. If it cannot locate the requested material, it may substitute other material on a related topic in the name of flexibility.

    This can improve the apparent completion rate in narrowly defined scenarios, but it changes the task’s meaning. The user receives a substituted result rather than the requested one. Over time, this kind of apparent compliance can be more dangerous than an explicit failure.

    2.3 Balancing Completion, Fidelity, and Verifiability

    Reliable model behavior should balance three dimensions:

    • Completion rate: Try legitimate alternative paths before abandoning a task.
    • Task fidelity: Alternative paths must preserve the task’s core meaning. Any deviation must be explicitly identified.
    • Verifiability: Outputs at every stage should include supporting sources so downstream checks are possible.

    3. Engineering Controls

    3.1 Prompts: Define Permitted Deviations Explicitly

    The workflow’s system prompt should distinguish between obstacles the model may work around and situations it must report.

    1. Rules:
    2. 1. If the target resource cannot be retrieved, you may try an alternative source for semantically equivalent material, but you must not substitute a different topic.
    3. 2. Whenever you deviate from the original request, add a [DEVIATION] marker to the output and explain why.
    4. 3. Mark all uncertain information as [UNVERIFIED]. Do not present it as established fact.
    5. 4. If a compliance concern arises for an individual item, skip that item and continue with the remaining tasks rather than interrupting the entire workflow.

    These rules make deviations visible and constrain what counts as an acceptable workaround.

    3.2 Validation: Keep Hallucinations Out of Storage

    Validate retrieval results against their sources before allowing them into the knowledge base. Every item should include an accessible original source. After downloading, check its keywords and relevance to the target topic.

    1. def validate(item, target_topic):
    2. if not item.source_url:
    3. return False, "Missing source"
    4. if relevance(item.content, target_topic) < THRESHOLD:
    5. return False, "Topic mismatch"
    6. return True, "Passed"

    Items that fail validation should enter a human review queue rather than proceed directly to format conversion and storage.

    3.3 Architecture: Add Checkpoints and Failure Reporting

    Long-running workflows need checkpoints. Persist intermediate state at each stage so progress and failures remain visible.

    When consecutive failures reach a defined threshold, notify a human operator. This prevents both silent failure and endless attempts to work around an obstacle.

    4. Conclusion

    Model selection for long-running workflows should not rely solely on single-turn benchmarks. It should also account for how a model controls hallucinations, identifies deviations, and reports exceptions.

    Regardless of the model provider or agent platform, prompt constraints, result validation, and checkpoints remain essential engineering foundations. The tension between model flexibility and reliable execution must ultimately be managed through system design.