Why LLM “Vibe Coding” Works Sometimes and Fails at Others: The Problem of Ignored Instruction Conflicts

    Large language models can be remarkably effective coding assistants, yet their inconsistent behavior creates a serious trust problem. When technical documents contain contradictory facts, a reliable model should detect the conflict instead of confidently choosing one answer. This article examines why models selectively overlook contradictions, how to evaluate that behavior rigorously, and which engineering safeguards can make AI-assisted development more dependable.

    Why LLM “Vibe Coding” Works Sometimes and Fails at Others: The Problem of Ignored Instruction Conflicts

    1. A Frustrating Test Scenario

    Consider a task in which a large language model must read a technical document where the pricing page and the announcement page provide directly conflicting descriptions of the same fact.

    A reliable model should do at least two things:

    1. Identify and point out the contradiction.
    2. Avoid confidently giving a single answer before the conflict has been verified or resolved.

    In practice, however, the results can be very different:

    • The same model with the same prompt may produce an error rate below 5% over 30 tests in the morning, then fail both tests conducted later that evening.
    • Different deployment channels, such as the official API and a third-party aggregation service, may produce different result distributions even when the model fingerprint appears to be the same.
    • At times, the model may appear outstanding, with strong coding capabilities and good cost efficiency. At other times, it may fail on a problem where the conflicting information is plainly visible and requires only modest reasoning to detect.

    This inconsistent and difficult-to-reproduce behavior is one of the biggest trust barriers in AI-assisted coding today. The core issue is not necessarily a lack of capability, but a lack of consistency. Users can delegate a task to the model, yet cannot predict whether it will operate in a “smart mode” or an “ignore mode” this time.

    2. Why Models Selectively Ignore Contradictions

    From a technical perspective, several factors commonly contribute to this behavior.

    2.1 Output Variance Caused by Sampling Randomness

    Inference commonly uses strategies such as temperature sampling and top-p sampling. Even with temperature set to 0, some inference services may still produce different outputs because of nondeterminism in batching or kernel implementations.

    When contradictory clues appear in the context, different sampling paths may cause the model to notice the conflict in one case but miss it in another. As a result, the same question can produce completely different conclusions across multiple runs.

    2.2 Attention Dilution in Long Contexts

    The longer the document, the farther apart the key pieces of conflicting information may be. When the model must connect two statements separated by thousands of tokens, attention may become diluted.

    The model may focus only on the locally relevant section—for example, a more recent or visually prominent announcement—while overlooking the other statement that conflicts with it. This is not simply a matter of poor comprehension; it reflects the inherent difficulty of retrieval and reasoning over long contexts.

    2.3 Instruction Following and Agreeable Generation

    Models trained extensively for instruction following often prioritize satisfying the user’s explicit request rather than questioning the assumptions behind it.

    When a user asks, “What is the price?”, the model is inclined to provide a definite answer. Identifying a contradiction requires it to interrupt that “satisfy the request” pattern. This tendency can become even stronger when the training data contains more examples with clear answers than examples requiring the model to challenge inconsistent premises.

    2.4 A Training Prior That Documents Are Internally Consistent

    Most documents in the training data are internally consistent. Models therefore learn a prior that they can find one authoritative statement and use it to answer the question.

    When real-world input violates this assumption, the model may lack a sufficiently strong contradiction-detection pattern. It then falls back on its learned prior and ignores the conflict.

    3. How to Evaluate This Capability Properly

    The original approach of running 30 tests is a useful starting point, but it is not rigorous enough to measure a model’s sensitivity to contradictions. A reproducible evaluation should include the following elements.

    3.1 Fix All Controllable Variables

    Record the complete set of request parameters and execution conditions:

    • temperature, top-p, and max tokens;
    • the system prompt;
    • the order in which context is assembled;
    • a fixed random seed, if the service supports one;
    • the model version or fingerprint, to prevent results from different versions from being mixed.

    3.2 Increase the Sample Size and Report Stratified Results

    Thirty trials are not enough to produce a stable confidence interval for the error rate. A more useful evaluation would include at least 200–500 trials and report results by input category:

    1. Input type Trials Conflict detected Conflict ignored False assertion
    2. Short document, nearby conflict 100 ? ? ?
    3. Long document, distant conflict 100 ? ? ?
    4. Table and announcement conflict 100 ? ? ?

    3.3 Define Clear Evaluation Criteria

    “Wrong” should be divided into more specific categories:

    • Missed conflict: The model fails to identify the contradiction and directly gives a single answer.
    • False positive: The model claims that a contradiction exists when the input is actually consistent.
    • Incorrect citation: The model identifies a conflict but cites the wrong location or misrepresents the source text.
    • Inconsistent conclusion: The model first gives answer A and then answer B within the same response.

    Counting only whether the final answer is correct can hide these fundamentally different failure modes.

    4. Engineering Mitigations

    Until model-level consistency improves, developers can significantly reduce the risk at the application layer.

    4.1 Explicitly Require Conflict Detection in the System Prompt

    1. Before answering, check whether the source material contains any
    2. mutually contradictory statements. If a contradiction exists, list
    3. the location and original text of each conflicting statement, and
    4. clearly state: “A unique answer cannot be provided until the
    5. contradiction is resolved.” Do not give a definitive conclusion
    6. without verification.

    This turns conflict detection into an explicit task instead of an implicit expectation.

    4.2 Use a Two-Stage Pipeline: Audit First, Answer Second

    In the first stage, use a dedicated prompt only to perform a consistency audit and produce a list of contradictions. In the second stage, inject that list into the context before generating the answer.

    Separating “discovering contradictions” from “generating an answer” can significantly reduce the probability of agreeable but unsupported responses.

    1. def answer_with_audit(context, question):
    2. conflicts = audit_model(context) # Find conflicts only
    3. prompt = build_prompt(context, question, conflicts)
    4. return answer_model(prompt) # Answer with the conflict list

    4.3 Combine Majority Voting with a Confidence Threshold

    For high-risk tasks, run multiple parallel requests—for example, five—and accept the result only when the answers converge. If the outputs disagree, route the case to human review.

    This approach directly addresses the underlying randomness behind the model’s “works sometimes, fails at others” behavior.

    4.4 Use Structured Extraction and Rule-Based Validation

    Extract key facts into structured fields and use deterministic validation logic to check consistency rather than relying solely on free-form model judgment.

    For example, for pricing information, a program can assert that values from two sources must match. If they do not, the system raises an alert. The model performs the extraction; deterministic rules make the decision.

    4.5 Keep Complete Logs and Build a Regression Set

    Store every failure case as a regression test, such as in JSONL format, and rerun the set whenever the model version changes.

    This turns the vague impression that the model was “good in the morning and bad in the evening” into a measurable, traceable, and comparable metric. It also makes it easier to report reproducible issues to the model provider.

    5. Maintain a Clear View of Model Limitations

    The most useful attitude is neither to dismiss the value of models nor to overlook their weaknesses. Their coding capabilities, cost efficiency, and impressive peak performance are all real. However, until consistency reaches an acceptable level, promises of one-click implementation should not be treated as reliable guarantees.

    For engineering teams, a practical approach is to treat an LLM as a highly capable but unstable junior engineer:

    • Low-risk, verifiable tasks—such as code completion, unit-test drafts, and documentation editing—can generally be delegated to it.
    • High-risk tasks that depend on factual accuracy—such as final decisions about pricing, compliance, or configuration—must retain programmatic validation and human review.
    • Consistency should be tracked through reproducible evaluations and regression suites rather than a few isolated samples.

    6. Conclusion

    The appeal of “vibe coding” is that users describe what they want and the model turns that intent into an implementation. The risk is that the model may sometimes produce something that merely looks like an implementation.

    Contradictory input is one of the most effective tests of a model’s reliability. A system worthy of trust should prefer to say, “These sources conflict, so I cannot determine the answer,” rather than conceal an unverified conclusion behind fluent and confident language.

    As model capabilities continue to improve, evaluation methods, pipeline design, and validation mechanisms on the developer side remain essential. They are the bridge that can turn AI-assisted coding from an occasional surprise into a dependable engineering practice.