Claim
Decompose a long-form answer into atomic claims and filter to the subset that is jointly supported, with a guarantee on the retained set — rather than trusting an entire generated answer because it “sounds right.”
Request
from cli_sdk import AnthropicBackend, CLIClient, Claim
with CLIClient() as client:
result = client.evaluate(
context={
"question": "What's your refund policy for annual plans?",
"retrieved_docs": retrieved_docs,
"draft_answer": draft_answer,
},
backend=AnthropicBackend(model="claude-sonnet-5-5"),
queries={
"filtered_answer": Claim(
instructions="Filter the draft answer to only fully-supported claims.",
calibration_profile="rag-factuality-v1",
alpha=0.05,
support_source="retrieved_docs",
),
},
)
answer = result.answers["filtered_answer"]
print(answer.as_text())
print(f"kept {answer.retention_rate:.0%} of claims")
for dropped in answer.dropped_claims:
print(dropped.text, dropped.reason, dropped.score)Response
{
"filtered_answer": {
"type": "claim",
"retained_claims": [
"Annual plans can be refunded within 30 days of purchase.",
"Refunds are issued to the original payment method."
],
"dropped_claims": [
{ "text": "Refunds typically take 2 business days.", "reason": "below calibrated support threshold", "score": 0.31 }
],
"threshold": 0.44,
"guarantee": {
"type": "coverage",
"alpha": 0.05,
"method": "conformal-factuality",
"statement": "With probability at least 95%, every retained claim is supported (conformal factuality, n=140).",
"calibration_profile": "rag-factuality-v1",
"calibration_n": 140,
"profile_version": 1,
"stats_version": "cci-sdk/0.1.1+hosted.1"
}
}
}The card is a coverage card over the whole retained set:
, over question and
answer pairs exchangeable with the calibration set. Claims scoring at or
below the calibrated threshold are dropped. A drift monitor on the
profile counts an answer as covered when every retained claim was
supported.
How claim support is scored
At answer time the backend first splits the draft into atomic claims. Each claim then gets a support score: the probability that it is supported, from a yes/no support question asked of the backend against the evidence.
- The evidence is the
support_sourcefield ofcontextwhen you name one (for example the retrieved documents); otherwise the whole context except ananswerfield. - At L1 (OpenAI and Azure non-reasoning configurations, vLLM, SGLang,
Bedrock Custom Model Import, the L1 presets) the score comes from
log-probabilities: one call per claim. With
access_hintset toprompt-scoringorexacton vLLM or SGLang, the yes/no options are scored at L2 or L3. - At L0 (Anthropic Claude, Gemini, reasoning-effort configurations) the
score is a smoothed frequency over
sample_countsamples per claim. This costs more calls, reported inresult.usage.backend_calls, but produces the same guarantee shape.
Hidden-state (L4) scoring does not apply to Claim.
Calibration data for Claim
Claim-level calibration needs every claim in each calibration example
labelled true or false against a reference. Each example’s label is the
list of its claims:
client.calibration_profiles.add_examples("rag-factuality-v1", examples=[
{
"context": {"question": question, "retrieved_docs": docs},
"label": [
{"text": "Annual plans can be refunded within 30 days of purchase.", "supported": True},
{"text": "Refunds typically take 2 business days.", "supported": False},
],
},
])The service scores every labelled claim against the example’s evidence
and calibrates the support threshold on those scores. This is
labour-intensive per example, so typical profiles are smaller than
classification profiles: 50 to 200 fully annotated question and answer
pairs is a reasonable starting point. The hosted label-with-judge job does not cover Claim profiles; label
claims directly. See the RAG claim filtering guide
for a full walkthrough. With a CustomBackend,
Claim evidence is a list of {"text", "score"} claims, which needs a
collect_evidence override.
Answer attributes
| Attribute | Type | Meaning |
|---|---|---|
retained_claims | list[str] | Claims that passed the calibrated support threshold |
dropped_claims | list[DroppedClaim] | Each with text, reason, and score |
retention_rate | float | Retained over total claims (0.0 when there are none) |
as_text(separator=" ") | str | Retained claims joined back into prose |
guarantee, is_heuristic | The guarantee card, and whether it is heuristic |
Parameters
| Parameter | Type | Description |
|---|---|---|
instructions | str | Required. What to filter, and to what standard. |
calibration_profile | str | Required. |
alpha | float, optional | Target: (0.10 by default). |
support_source | str, optional | Context field to score claims against directly (for example, retrieved documents). |