Skip to main content
Glama

groundcheck_compare

Read-only

Compare two candidate answers to a query and determine which is better based on faithfulness, completeness, and relevance, with automatic mitigation of position bias.

Instructions

Judge which of two candidate answers to query is better.

Use this to A/B two RAG configurations (prompts, retrievers, models) on
the same query. Position bias is mitigated automatically: the judge sees
(A,B) and (B,A) in separate calls, and any criterion whose verdict flips
with presentation order is reported as a tie rather than a pick.

Args:
    query: the shared query both answers respond to.
    answer_a: first candidate answer.
    answer_b: second candidate answer.
    sources: optional list of {id, text} chunks, used to judge faithfulness.
    criteria: judged criteria (default ["faithfulness", "completeness", "relevance"]).

Returns a winner ("a"/"b"/"tie/uncertain"), a verdict per criterion, and a
brief rationale. Costs 2 model calls via your client's sampling -- no API
key needed if your client supports sampling.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
sourcesNo
answer_aYes
answer_bYes
criteriaNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
winnerYes
criteriaYes
rationaleYesBrief overall rationale, notes disagreement if any.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds value beyond annotations by explaining the tie mechanism (double call to mitigate position bias), the return structure (winner, verdict per criterion, rationale), and resource usage (costs 2 model calls, no API key needed if sampling supported). Annotations already indicate read-only behavior, so no contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a concise one-line summary followed by usage context and an Args list. Every sentence adds value, and it is appropriately sized without redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers most aspects: purpose, usage, parameter semantics, behavioral details, and return. However, it could mention potential error cases or edge scenarios (e.g., empty answers). Given the presence of an output schema, return values are adequately described. The tool's role among siblings is clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description provides clear explanations for all parameters in the Args section: query, answer_a, answer_b, sources, and criteria (with default). This compensates fully for the schema's lack of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool judges which of two candidate answers is better, using specific verbs ('judge', 'compare') and a defined resource (candidate answers to query). It distinguishes from sibling tools like groundcheck_detect_hallucinations by focusing on A/B comparison rather than detection of single issues.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly describes when to use this tool: 'Use this to A/B two RAG configurations (prompts, retrievers, models) on the same query.' It also explains position bias mitigation. However, it does not explicitly state when not to use it or mention alternatives, though sibling tools are available for other tasks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/offquestxo/groundcheck'

If you have feedback or need assistance with the MCP directory API, please join our Discord server