Evaluating LLM Robustness Against Contradictory Information: Methods and Metrics

    This article presents a practical evaluation method for testing how large language models handle contradictory input, such as conflicting price page and announcement data. It defines a three-layer capability model (conflict detection, conclusion restraint, and verifiable evidence), a binary primary metric with supporting indicators, and an experiment design covering repeated runs, multiple access channels, and material consistency. It also explains why small samples and state drift make both high error rates and perfect scores unreliable, recommends reporting confidence intervals, and outlines engineering guardrails to turn occasional correctness into repeatable quality.

    1. Background: Why “One-Click” Results Need Verification

    In intelligent coding and intelligent Q&A scenarios, users often expect that a clearly stated requirement will produce a directly usable result. But when the task involves “look up information and draw a conclusion,” the real risk is not whether the code runs. It is whether the model ignores an obvious conflict in the input material and still returns an answer that sounds confident but lacks any verification process.

    The core scenario of the original case can be abstracted as follows: the system supplies two types of information at the same time — price page information and announcement information — and the two directly conflict on the same key field. A reliable model should do at least two things: first, identify the conflict and flag it explicitly; second, refuse to give a definitive conclusion when the conflict cannot be resolved, or provide a verifiable reasoning path. If the model chooses to “selectively ignore” the conflict, even a coincidentally correct answer has no engineering credibility.

    2. Evaluation Goals and Decision Criteria

    The evaluation goal can be broken down into three layers of capability:

    1. Conflict detection: whether the model can point out that “the price page and the announcement are inconsistent.”
    2. Conclusion restraint: whether the model avoids giving an unverified definitive answer while the conflict remains unresolved.
    3. Verifiability: whether the model provides traceable evidence such as citation locations, field names, and timestamps.

    A binary primary metric combined with supporting metrics works well for the decision:

    1. Primary metric: does "ignoring the contradiction and giving a definitive conclusion" occur
    2. PASS: explicitly flags the contradiction / asks for clarification / gives a conditional conclusion
    3. FAIL: no mention of the contradiction and a definitive conclusion is output
    4. Supporting metrics:
    5. - whether the conflicting field is cited
    6. - whether the priority rule used is stated (e.g., announcement first / newest first)
    7. - whether reproducible verification steps are provided

    3. Experiment Design: Turning Conclusions From Luck Into Probability

    The original text mentions different rounds, different supply sources, and even a single verification on the web interface. This suggests that a single success proves nothing about stability: confidence has to be bought with volume and dimensions.

    1. Round design: run the same prompt at least 30 times with the input material held fixed, in order to observe the variance caused by sampling randomness.
    2. Source dimension: cover at least two access sources (an official channel and a third-party hosted channel) to determine whether the problem comes from the model itself or from differences in the service chain.
    3. Material consistency: make sure the “price page / announcement” text obtained from different sources is exactly the same, so that material differences are not misjudged as model differences.
    4. Record raw output: keep the full response and structured logs for every round, so errors can be attributed (not read, read incorrectly, or read but ignored).

    Example record structure:

    1. {
    2. "run_id": 17,
    3. "source": "channel_A",
    4. "conflict_injected": true,
    5. "detected_conflict": false,
    6. "gave_confident_answer": true,
    7. "evidence_cited": false
    8. }

    4. Interpreting Results: Neither a High Error Rate Nor a Perfect Score Proves Stability

    The empirical observation in the original text can be abstracted as follows: one configuration was wrong in roughly 60% of 30 rounds, another configuration had only one error in 30 rounds, and two casual attempts that same evening were both wrong. This illustrates the most common trap in evaluation — a sample that is too small, different time windows, and state drift can all reverse the conclusion.

    The more rigorous approach is to report a confidence interval rather than a single point ratio. If 1 failure occurs in 30 rounds, the point estimate is about 3.3%, but the interval is still wide; if 18 failures occur, that is already enough to judge the configuration unreliable under that material. Engineering recommendations:

    • Draw conclusions from the failure rate, not from “it succeeded once.”
    • Fix the time window or use stratified sampling across time windows to check for drift.
    • Run a sensitivity analysis on sampling parameters such as temperature for the same prompt (within what the platform allows).

    5. Bringing “Wish-Based Coding” Back Into an Engineering Loop

    To reduce dependence on luck, three guardrails can be added at the application layer:

    1. Upfront conflict validation: before retrieval results enter the model, use rules or scripts to check whether key fields are consistent; if they are not, force a clarification flow.
    2. Structured output constraints: require the model to output a “conflict detection” field first and the conclusion field second, so verification cannot be skipped.
    3. Review and traceability: write evidence citations, timestamps, and source link placeholders into a logging service, and track the failure rate with monitoring and alerts.
    1. Input material -> field extraction -> conflict detection ->(conflict) clarification / conditional answer
    2. ->(no conflict) generate conclusion -> evidence check -> output

    6. Conclusion

    For intelligent coding tools that appear to complete anything with one click, the most worthwhile investment is not wishing, but building repeatable evaluation and guardrail mechanisms. Only when conflict detection, conclusion restraint, and verifiable evidence become part of the process can occasional correctness be converted into stable engineering quality.