Analyzing Multi-Model Output Consistency: Finding Consensus and Divergence in Recommendation Results

    This article presents a practical approach for comparing structured outputs from multiple large language models when they answer subjective recommendation questions. It covers prompt design for data collection, output normalization, four quantitative metrics for consensus (Jaccard similarity, top-1 agreement, pairwise order agreement, and dimension distribution), a sample Python implementation, and a framework for classifying sources of disagreement. The method is domain-agnostic and suitable for use cases such as content recommendation audits, sentiment analysis, and model evaluation. Key limitations and operational recommendations are also discussed.

    1. Problem Background

    When the same subjective question is posed to multiple large language models, their responses often overlap in some areas while diverging in others. For example, when asked “which item from a candidate set is most worth buying,” different models typically return three to five candidates along with justifications. Manually reading through these outputs makes it difficult to quickly identify which conclusions reflect broad consensus and which are preferences unique to a single model.

    This article discusses a general technical problem: how to convert outputs from multiple models into comparable data and quantify the degree of agreement. The method does not depend on any specific product and applies to scenarios such as content recommendation auditing, public opinion analysis, and model selection evaluation.

    2. Objectives and Boundaries

    The approach centers on three objectives:

    1. Unify output formats so that responses from different models can be aligned item by item.
    2. Calculate consensus metrics, including candidate overlap rate and ranking consistency.
    3. Identify sources of divergence, distinguishing between “different options” and “different reasons.”

    This article focuses on structured comparisons for subjective recommendation questions and does not judge the objective correctness of conclusions. For questions with a factual standard, evaluation should rely on labeled datasets rather than inter-model consensus.

    3. Data Collection and Prompt Design

    The reliability of evaluation results depends on the controllability of the data collection phase. The following four points are recommended:

    1. Fixed prompt template: All models use the same problem description, including the candidate scope and output format requirements.
    2. Controlled variables: Fix sampling parameters (e.g., temperature) and record model version, call time, and parameter configuration.
    3. Multiple sampling: Repeatedly call the same model for the same question three to five times to distinguish model-internal stability from inter-model differences.
    4. Constrained output format: Require the model to return JSON with fields including rank, item, and reason.

    A sample prompt template is as follows:

    1. Select the three items you think are most worth recommending from the following candidates, ranked in order of preference, and give a one-sentence reason for each.
    2. Output strictly as a JSON array, each element containing rank (integer), item (string), and reason (string).
    3. Candidate list: {candidates}

    4. Output Normalization

    Free-form text must first be parsed into a unified structure. Common practices include:

    • Prefer structured output; fall back to rule-based extraction only when parsing fails.
    • Map candidate name aliases, such as unifying full-width/half-width characters, case differences, and common abbreviations to canonical names.
    • Classify reason text using keywords or sentence embeddings, mapping phrases like “high cost performance,” “strong performance,” or “brand appeal” to unified dimension labels.

    After normalization, each record should contain fields such as model_id, run_id, item, rank, and dimension. Raw text should also be preserved for traceability when anomalies occur.

    5. Consensus Metrics

    Four types of metrics are used to measure agreement:

    1. Candidate overlap (Jaccard similarity): The size of the intersection of two models’ Top-K sets divided by the size of their union. Values range from 0 to 1; closer to 1 indicates more similar recommendation sets.
    2. Top-1 agreement rate: The proportion of cases where multiple models have the same first-ranked item, reflecting whether the strongest conclusion is consistent.
    3. Ranking consistency: For candidates that appear in both models, the proportion of pairwise orderings that are the same.
    4. Dimension distribution: The frequency of each dimension label in the reasons, indicating whether models focus on the same factors.

    When interpreting metrics, the value of K must be considered. For K = 3, the chance of coincidental overlap is relatively high, so conclusions should be drawn only after increasing the sample size.

    6. Sample Code

    The following code uses only the Python standard library to compute Jaccard similarity and ranking consistency:

    1. from itertools import combinations
    2. def jaccard(a, b):
    3. """Compute Jaccard similarity between two candidate sets."""
    4. a, b = set(a), set(b)
    5. if not a and not b:
    6. return 1.0
    7. return len(a & b) / len(a | b)
    8. def pairwise_order_agreement(rank_a, rank_b):
    9. """
    10. rank_a, rank_b: candidate names in recommendation order.
    11. Only considers candidates present in both lists; returns the proportion of ordered pairs that agree.
    12. """
    13. common = [x for x in rank_a if x in rank_b]
    14. if len(common) < 2:
    15. return None
    16. pos_b = {item: i for i, item in enumerate(rank_b)}
    17. total = agree = 0
    18. for x, y in combinations(common, 2):
    19. total += 1
    20. # common is already ordered by rank_a, so x appears before y;
    21. # agreement requires x to also appear before y in rank_b.
    22. if pos_b[x] < pos_b[y]:
    23. agree += 1
    24. return agree / total
    25. def consensus_report(results):
    26. """
    27. results: dict with model identifiers as keys and ordered Top-K candidate lists as values.
    28. Returns Jaccard similarity and order agreement for each model pair.
    29. """
    30. report = {}
    31. for m1, m2 in combinations(results.keys(), 2):
    32. report[(m1, m2)] = {
    33. "jaccard": round(jaccard(results[m1], results[m2]), 3),
    34. "order_agreement": pairwise_order_agreement(results[m1], results[m2]),
    35. }
    36. return report
    37. if __name__ == "__main__":
    38. sample = {
    39. "model_A": ["候选1", "候选2", "候选3"],
    40. "model_B": ["候选2", "候选1", "候选4"],
    41. "model_C": ["候选1", "候选3", "候选2"],
    42. }
    43. for pair, metrics in consensus_report(sample).items():
    44. print(pair, metrics)

    The candidate names in the example are placeholders. In actual use, apply the normalization step from Section 4 before passing results to these functions.

    7. Divergence Analysis

    Low consensus does not necessarily mean the results are unusable. We recommend classifying divergences into three types:

    • Option divergence: Different candidate sets, usually indicating significant differences in model knowledge coverage or preference.
    • Ranking divergence: Same candidate set but different order, often caused by different weighting of decision factors.
    • Reason divergence: Same conclusion but different justifications, useful for observing how models explain their choices.

    Manually reviewing samples for each divergence type helps quickly identify prompt ambiguity or normalization errors. If a particular type of divergence concentrates on the same kind of candidate, check whether the prompt description for that candidate is ambiguous.

    8. Limitations

    This method has the following limitations to keep in mind:

    1. Subjective questions have no standard answer; consensus metrics only reflect what the majority of models tend to conclude, not the reasonableness of that conclusion.
    2. Different models may have overlapping training data, so seemingly independent conclusions are not necessarily independent in origin.
    3. Wording of prompts and the order of candidates can affect output. Candidates should be randomized to reduce positional bias.
    4. Normalization rules themselves introduce errors; sampled checks of the mapping results are necessary.

    9. Practical Recommendations

    1. Freeze the evaluation set and prompt version before comparing model results to avoid changing multiple variables at once.
    2. Save raw outputs, parsed results, and metrics for each evaluation to maintain a traceable record.
    3. In high-risk scenarios such as finance and healthcare, consensus conclusions should serve only as auxiliary signals; final decisions still require professional human review.

    10. Summary

    The core of multi-model consensus analysis lies in two steps: first, converting free-form text into structured data; second, measuring consensus and divergence with interpretable metrics. This workflow is independent of any specific product and can be adapted to recommendation ranking, content auditing, model selection, and other scenarios.