Structured extraction with a verification pass
Recover a value from messy text while keeping normalization and validation deterministic.
CHOICE×2
01
HOW IT WORKS
state = {
"document": "Invoice total: INR 1,24,500.00 payable by 14/10/26.",
"candidate_amounts": ["1,24,500.00"],
"candidate_dates": ["14/10/26"],
}
questions = {
"amount_candidate": Choice(
instructions="Which item in `candidate_amounts` is the invoice total?",
criteria={"0": "The candidate at index 0 is the invoice total.", "none": "No candidate is the invoice total."},
),
"date_candidate": Choice(
instructions="Which item in `candidate_dates` is the payment due date?",
criteria={"0": "The candidate at index 0 is the payment due date.", "none": "No candidate is the payment due date."},
),
}After Jev selects a candidate, parse it with a locale-aware library, validate the range and currency, and reject malformed values. Do not ask Jev to emit a free-form number when a parser can do the final conversion.
Source: Pre-parsed value extraction and date extraction.
1 次请求 / 2 个答案
这个模式的一句话