Claim Extraction
Extracts atomic claims from a candidate answer using a chat-completion model, writing them to output_field. The question and answer inputs are read from the source columns configured in columns. This is the first step of the claim-based RAG pipeline; the extracted claims are consumed by the Claim Labeling and Link Claim Quotes synthesizers.
Output
One output sample per source sample with the extracted claims written to output_field.
Examples
Example: Claim extraction. Extracts atomic claims from each candidate answer into the claims field.
Claim Extraction Synthesizer
# ...
config_spec:
- key: "synthesizer_model_key"
type: "model"
display_name: "Synthesizer Model"
description: "Model used to extract claims from question-answer pairs."
definition:
# ...
synthesizers:
- type: claim_extraction
model_key: "<< config.synthesizer_model_key >>"
columns:
question: question
answer: expected_answerWith the columns bindings above, the question is read from the question column and the candidate answer from the expected_answer column:
Source Sample
{
"question": "What is the capital of France?",
"expected_answer": "The capital of France is Paris. Paris is well known for its Eiffel Tower."
}The synthesizer produces one output sample, which keeps the source columns and adds the extracted claims under claims - one (subject, predicate, object) triplet per fact found in the answer:
Output Sample
{
"question": "What is the capital of France?",
"expected_answer": "The capital of France is Paris. Paris is well known for its Eiffel Tower.",
"claims": [
{"claim": {"subject": "Paris", "predicate": "is the capital of", "object": "France"}},
{"claim": {"subject": "Paris", "predicate": "is well known for its", "object": "Eiffel Tower"}}
]
}Set output_field to write the claims to a different column - the Claim Labeling and Link Claim Quotes synthesizers then read that column through their own columns bindings.
The claims are extracted by a model, so the exact triplets vary between runs.
Configuration
Properties
type Literal “claim_extraction” required
The type of the synthesizer.
model_key TemplateValue required
The key of the chat completion model to be used as a synthesizer.
output_field string, TemplateValue
Name of the structured output field written to each generated sample.
Default: claims
instructions string, TemplateValue
Optional domain-specific instructions appended to the built-in system prompt.
Default: None
columns ClaimExtractionColumnBindings
Mapping from built-in inputs to source sample columns.