Skip to main content

ClaimExtractor

ClaimExtractor reads a conversation and extracts two structured outputs from the last message of the conversation:

  • claims: factual statements, labelled with one of four subtypes;
  • intents (only if the message is a user message): explicit goals, requests, or actions the user wants to accomplish
The last message of a conversation, the user's "I am abroad from December 10th for two weeks. Can you deliver on the 28th?", after the user's "Where is my package?" and the assistant's "Your package arrives on December 12th.", goes into ClaimExtractor and comes out as two claims you can check, both User Assertions, "The user is abroad from December 10th." and "The user will be away for two weeks.", and one intent you can route, "The user wants delivery on December 28th."The last message of a conversation, the user's "I am abroad from December 10th for two weeks. Can you deliver on the 28th?", after the user's "Where is my package?" and the assistant's "Your package arrives on December 12th.", goes into ClaimExtractor and comes out as two claims you can check, both User Assertions, "The user is abroad from December 10th." and "The user will be away for two weeks.", and one intent you can route, "The user wants delivery on December 28th."

Each extraction is decontextualized: it stands on its own without reference to the surrounding conversation, so it can be consumed directly by fact-checkers, intent routers, hallucination detectors, and audit pipelines without re-parsing history.

If you have a description of your AI service, pass it too: it is optional, but it improves the extractions, Capability claims above all. Plain text works, and the library's structured AIServiceDescription works best.

See it in the PlaygroundExample conversations, each with what ClaimExtractor returned.

Claim subtypes​

Each claim comes with one of four subtypes, which tells you what to check:

SubtypeWhat it covers
FactoidVerifiable facts about the world: dates, prices, procedures, locations, contact details. From either role.
CapabilityWhat the AI service can or cannot do, mostly stated by the assistant.
User AssertionFacts the user states about their own situation ("my ID expired"). User messages only.
UnverifiableCommon knowledge, opinions, marketing language, hedged predictions: tagged, not dropped.
warning

ClaimExtractor verifies nothing: checking Factoid and Capability claims against your sources is your step.

Intents​

ClaimExtractor returns one intent for each request the user states, and none for assistant messages. The request has to be stated: "I have a dog" is a User Assertion, with no intent expressed.

AI service Parcel delivery assistant.
Assistant
Your package arrives on December 12th.
User Extracted
I am travelling abroad from December 10th and will be away for two weeks. Can you reschedule the delivery to December 28th and email me a receipt?
Extractions
Claims
  • User AssertionThe user is travelling abroad starting from December 10th.
  • User AssertionThe user will be away for two weeks.
Intents
  • The user wants to reschedule the delivery of their package to December 28th.
  • The user wants the parcel delivery service to email them a receipt.

First call​

You need Linux with an NVIDIA GPU and Python 3.10 to 3.13. The first run downloads the weights from Hugging Face (about 9.3 GB for the 4B).

Pythonfirst_call.py
pip install "orbitals[claim-extractor-vllm]"
from orbitals.claim_extractor import ClaimExtractor

ce = ClaimExtractor(
backend="vllm",
model="principled-intelligence/claim-extractor-4B-q-2605",
)

output = ce.extract(
[
{"role": "user", "content": "Do you offer express delivery to Milan?"},
{
"role": "assistant",
"content": (
"Yes: express delivery to Milan costs 9.90 euros "
"and arrives the next business day. "
"I can also upgrade an order you already placed, "
"if you send me its tracking number."
),
},
],
)

for claim in output.extractions.claims:
print(claim.subtype, claim.content)
# e.g. Factoid Express delivery to Milan costs 9.90 euros.
No GPU? The same call runs on the hosted API.Hosted version