list_model_disagreements
Reveals direct contradictions, disputed claims, and low-similarity pairs between model responses on a query, with similarity scores. Use it to analyze divergence and identify areas of disagreement.
Instructions
Return where models diverged on a query — direct contradictions (inversions), disputed claims, and low-similarity pairs with their similarity scores. Use this to understand the friction space: inversions are not errors, they are intelligence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query_id | Yes | The run/query ID returned by converge_query |
Implementation Reference
- src/lib/client.ts:131-167 (handler)The `listModelDisagreements` handler function. Fetches a run by queryId from the convergence service, retrieves its consensus analysis, and returns disagreements data including inversions, disputed claims, similarity matrix, and low-similarity pairs.
export async function listModelDisagreements(queryId: string): Promise<{ query_id: string; total_disagreements: number; inversions: ConsensusAnalysis['inversion_pairs']; disputed_claims: string[]; similarity_matrix: ConsensusAnalysis['similarity_matrix']; low_similarity_pairs: ConsensusAnalysis['similarity_matrix']; }> { // Get run from convergence service to find analysis ID const run = await get<{ consensus_analysis_id?: string; model_responses?: unknown[] }>( `${CONVERGENCE_SERVICE_URL}/runs/${queryId}` ); if (!run.consensus_analysis_id) { return { query_id: queryId, total_disagreements: 0, inversions: [], disputed_claims: [], similarity_matrix: [], low_similarity_pairs: [], }; } const analysis = await getConsensusAnalysis(run.consensus_analysis_id); const lowSimilarityPairs = analysis.similarity_matrix.filter((p) => p.score < 0.5); return { query_id: queryId, total_disagreements: analysis.inversion_pairs.length + analysis.disputed_claims.length, inversions: analysis.inversion_pairs, disputed_claims: analysis.disputed_claims, similarity_matrix: analysis.similarity_matrix, low_similarity_pairs: lowSimilarityPairs, }; } - src/index.ts:127-142 (registration)Tool registration: defines the tool name 'list_model_disagreements', its description, and input JSON Schema (requires 'query_id' string). Registered in the ListToolsRequestSchema handler.
{ name: 'list_model_disagreements', description: 'Return where models diverged on a query — direct contradictions (inversions), disputed claims, and low-similarity pairs with their similarity scores. ' + 'Use this to understand the friction space: inversions are not errors, they are intelligence.', inputSchema: { type: 'object' as const, required: ['query_id'], properties: { query_id: { type: 'string', description: 'The run/query ID returned by converge_query', }, }, }, }, - src/index.ts:205-217 (schema)Tool call dispatch: Zod schema validation (query_id string) and call to the handler function. Part of the CallToolRequestSchema switch-case.
case 'list_model_disagreements': { const schema = z.object({ query_id: z.string() }); const params = schema.parse(args); const result = await listModelDisagreements(params.query_id); return { content: [ { type: 'text' as const, text: JSON.stringify(result, null, 2), }, ], }; - src/lib/client.ts:127-128 (helper)Helper function `getConsensusAnalysis` used by `listModelDisagreements` to fetch consensus data from the consensus service.
export async function getConsensusAnalysis(analysisId: string): Promise<ConsensusAnalysis> { return get<ConsensusAnalysis>(`${CONSENSUS_SERVICE_URL}/analysis/${analysisId}`); - src/lib/client.ts:37-46 (helper)Generic HTTP GET helper used to fetch data from the convergence and consensus services.
async function get<T>(url: string): Promise<T> { const response = await fetch(url, { headers: authHeaders() }); if (!response.ok) { const text = await response.text(); throw new Error(`HTTP ${response.status}: ${text}`); } return response.json() as Promise<T>; }