Skip to navigation

API name: contradiction_checker · Category: Accuracy

Flag places where a document contradicts itself: incompatible dates, figures, capabilities, scope, identities, definitions, and positioning claims, plus references to figures, tables, steps, or sections that don’t exist. For what this agent does and why it matters, see Contradictions in the Agent Catalog.

What it returns

The run status plus one issue per contradiction. Unlike most agents, a Contradictions issue usually covers two or more places in the text, listed in positions (see Issues that span several places). Each issue also carries an explanation that names what each place says, a confidence score, and a category set to one of these types:

categoryWhat conflictsRisk
temporalDates, durations, ages, or the order of eventsHigh
statisticalOne figure or measurement stated with different valuesHigh
capabilityWhat the product does or requiresHigh
negation_modalityOne flipped word: never/always, must/may, all/mostHigh
entityThe identity or attributes of one product, company, or personMedium
scopeWho or what something is for, or where it appliesMedium
comparativePositioning claims, such as cheaper versus premiumMedium
causalSomething is the problem in one place and a feature in anotherMedium
structural_referenceA reference to a figure, table, step, or section that doesn’t existMedium
definitionalA key term is used with two meaningsLow

Every candidate is checked by a second reviewer before it’s returned. When the reviewer finds that the passages can be reconciled only under a narrow reading, the issue is still returned, at Low risk, with an explanation that starts “Possible tension (not a strict contradiction):”.

A structural_reference issue can have a single place (the dangling reference itself). In that case positions is omitted and position holds the reference, like any single-span issue.

The agent takes no configuration and never consults an external source of truth or the current date.

Example response

For this input:

Join us in Austin on July 10th for the Guardian Summit. Sessions run all day.
Logistics: doors open at 8am on 7/11/2026 and badges are collected at the desk.

the agent returns one issue with both dates in positions:

{
"issues": [
{
"agent": "contradiction_checker",
"category": "temporal",
"severity": "high",
"confidence": 0.95,
"explanation": "The opening gives July 10th as the summit date, but the logistics section says doors open on 7/11/2026; one event cannot have both dates.",
"position": { "start": 21, "end": 30, "text": "July 10th" },
"positions": [
{
"start": 21,
"end": 30,
"text": "July 10th",
"suggestions": ["July 10th", "July 11th"]
},
{
"start": 111,
"end": 120,
"text": "7/11/2026",
"suggestions": ["7/10/2026", "7/11/2026"]
}
],
"suggestion": "July 10",
"suggestions": ["July 10", "July 11"]
}
]
}

Read it like this:

  • suggestions on the issue are the choices to offer the user, best first. Choosing “July 11” means every place becomes July 11.
  • positions[i].suggestions[j] is the text that choice j writes at place i, in that place’s own format. Choosing “July 11” (index 1) writes “July 11th” over the first place and leaves “7/11/2026” unchanged at the second. An entry equal to the place’s text means that choice leaves the place as it is.
  • When a contradiction needs a rewrite rather than a substitution (most comparative, causal, and definitional issues), the issue has no suggestions, and neither do its positions.

Run this agent

Agents are run by ID, but you never need to hardcode one: resolve the ID from the agent’s stable name (contradiction_checker) with GET /agents, then call POST /agents/{agent_id}/run. Pass wait=true to block until the run completes; omit it to get a workflow_id back immediately and track the run with GET /agents/workflows/{workflow_id} (or a webhook_url in the request body).

Send the whole document in one run. The agent compares passages against each other, so splitting a document into chunks hides the contradictions between them.

TOKEN="YOUR_TOKEN"
# Resolve the agent ID by name
AGENT_ID=$(curl -s "https://api.markup.ai/agents?page_size=100" \
-H "Authorization: Bearer $TOKEN" \
| jq -r '.agents[] | select(.name == "contradiction_checker") | .id')
# Run the agent and wait for the result
curl -X POST "https://api.markup.ai/agents/$AGENT_ID/run?wait=true" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"text": "Your content to check."}'

Prefer MCP? On the hosted MCP server, run this agent with markupai_run_agents and agents: ["contradiction_checker"], or let markupai_review select it from your goal. See the MCP overview. MCP results currently carry only each issue’s first place (position) and the issue-level suggestions. Use the REST API when you need the full positions array.