Open-source adapters
Reasoning
The reasoning adapters compare one thing with another and give a short verdict: does this evidence support a claim, do two records disagree, do two descriptions mean the same thing, does a document meet a requirement, is a pack of documents complete? They are the checks a careful reviewer makes before acting, written out so your code can apply them to every case. Each one answers with one of a few verdicts, one of which is always "unclear", so the function can flag a case it cannot settle instead of forcing a yes or no answer. The page ends with a different kind of adapter: one that answers multiple-choice general-knowledge questions.
Each example below uses an input written for this page and shows the answer returned by the live API. To run one yourself, set JEFF_API_KEY as in the Quick start.
Claim support check
Claim support check checks whether the evidence given (documents, messages or records) supports a claim: supported, unsupported or unclear. Here an accounts payable team checks a supplier's claim against the purchase order and the signed delivery note before paying:
Context
- setting
- The accounts payable team of a mid-sized furniture maker checks supplier claims before paying.
- evidence
- - {"source":"purchase order","text":"Purchase order 4471, issued 3 February 2026 to Calder Timber, for 120 oak boards at 18.50 each, delivery by 28 February 2026."} - {"source":"delivery note","text":"Delivery note for purchase order 4471, signed at the loading bay on 26 February 2026. Received 120 oak boards, no damage noted."}
Input
Calder Timber delivered the full order for purchase order 4471 before the agreed date.
- Answer (JSON)
- value supported, confidence 0.615
- Top options
- supported 0.615
- unsupported 0.383
- unclear 0.002
import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client: decide = client.function("jeff.reasoning.entails.entails", context={ "setting": "The accounts payable team of a mid-sized furniture maker checks supplier claims before paying.", "evidence": [ { "source": "purchase order", "text": "Purchase order 4471, issued 3 February 2026 to Calder Timber, for 120 oak boards at 18.50 each, delivery by 28 February 2026.", }, { "source": "delivery note", "text": "Delivery note for purchase order 4471, signed at the loading bay on 26 February 2026. Received 120 oak boards, no damage noted.", }, ], }) decision = decide("Calder Timber delivered the full order for purchase order 4471 before the agreed date.") print(decision.value, decision.confidence)
The answer is supported, which is right (all 120 boards arrived on 26 February, before the 28 February deadline),
but its confidence is only 0.615. Low confidence means the function is uncertain: across many answers assigned a confidence of about
0.6, roughly four in ten are wrong. Do not act on such an answer alone. Check abstained (it is true when the
confidence is below the threshold set during calibration), and send uncertain cases to a person or a
larger model, or let Jeff do that with an on_low_confidence policy. See Calibrated confidence and
Escalation.
Contradiction check
Contradiction check checks whether two statements or records conflict: yes, no, or unclear (for example a date that can be read two ways). Here a clinic's record says the patient has no known allergies, and a letter from the patient's doctor says otherwise:
Context
- setting
- The front desk team of a community health clinic reviews patient records before appointments.
- statement_a
- source: record entry text: Allergies: none known. Last reviewed 12 January 2026.
Input
source: GP letter, 10 January 2026 text: The patient has a confirmed penicillin allergy, recorded in 2019.
- Answer (JSON)
- value yes, confidence 0.941
- Top options
- yes 0.941
- no 0.058
- unclear 0.001
import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client: decide = client.function("jeff.reasoning.contradicts.contradicts", context={ "setting": "The front desk team of a community health clinic reviews patient records before appointments.", "statement_a": { "source": "record entry", "text": "Allergies: none known. Last reviewed 12 January 2026.", }, }) decision = decide({ "source": "GP letter, 10 January 2026", "text": "The patient has a confirmed penicillin allergy, recorded in 2019.", }) print(decision.value, decision.confidence)
yes means the two records conflict, so the record needs correcting before the appointment.
Same meaning check
Same meaning check checks whether two items mean the same thing within a stated scope, allowing for differences in wording, units and formats: yes, no or unclear. Here an online bookshop compares two suppliers' listings before merging them:
Context
- setting
- The data team of an online bookshop compares supplier listings before merging duplicate products.
- scope
- Every fact that identifies the edition counts (title, author, format, page count and year); wording and punctuation do not.
- item_a
- The Lighthouse Keeper's Daughter by Ana Rivas, paperback, 312 pages, published 2021.
Input
Ana Rivas, The Lighthouse Keeper's Daughter (paperback edition, 2021), 312 pp.
- Answer (JSON)
- value yes, confidence 0.971
- Top options
- yes 0.971
- no 0.028
- unclear 0.001
import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client: decide = client.function("jeff.reasoning.equivalent.equivalent", context={ "setting": "The data team of an online bookshop compares supplier listings before merging duplicate products.", "scope": "Every fact that identifies the edition counts (title, author, format, page count and year); wording and punctuation do not.", "item_a": "The Lighthouse Keeper's Daughter by Ana Rivas, paperback, 312 pages, published 2021.", }) decision = decide("Ana Rivas, The Lighthouse Keeper's Daughter (paperback edition, 2021), 312 pp.") print(decision.value, decision.confidence)
yes means every fact the scope names (title, author, format, pages and year) agrees, so the two listings are the
same edition and can be merged.
Requirement check
Requirement check checks whether an item (a document, message or record) meets one stated requirement: pass, fail or unclear. Here a housing association's lettings officer needs proof of income from the last three months:
Context
- context
- organisation: A regional housing association checker: Lettings officer item_kind: Proof of income date: 2 November 2026
- requirement
- The document must be dated in August, September or October 2026.
Input
Payslip - Marlow Cleaning Services Ltd Employee: Joan Pereira Pay date: 31 May 2026 Gross pay: 1,840.00 Net pay: 1,512.36
- Answer (JSON)
- value fail, confidence 0.908
- Top options
- fail 0.908
- unclear 0.078
- pass 0.014
import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client: decide = client.function("jeff.reasoning.satisfies.satisfies", context={ "context": { "organisation": "A regional housing association", "checker": "Lettings officer", "item_kind": "Proof of income", "date": "2 November 2026", }, "requirement": "The document must be dated in August, September or October 2026.", }) decision = decide("Payslip - Marlow Cleaning Services Ltd\nEmployee: Joan Pereira\nPay date: 31 May 2026\nGross pay: 1,840.00 Net pay: 1,512.36") print(decision.value, decision.confidence)
fail means the payslip does not meet the requirement: it is dated May, not August, September or October.
The requirement names the months it accepts. Relative date windows, such as "dated within the three months before the application", are a known weak spot of this version: the function does not reliably count months back from a date. Calculate the window in your own code and write the requirement with the dates or months it allows, as here.
Document completeness check
Document completeness check checks a pack of documents against a checklist: complete, incomplete (something missing, expired, unsigned or about someone else) or unclear. Here a small business lender checks a loan application pack before credit review:
Context
- context
- organisation: A small business lender reviewer: Loan operations analyst pack_kind: Business loan application purpose: Check the application pack is complete before credit review review_date: 2 November 2026
- checklist
- - Signed loan application form (all pages) - Business bank statements for the last three months - Photo identification of every director - Latest annual accounts (only for businesses trading more than two years)
Input
case: {"name":"Ferngrove Bakery Ltd","reference":"APP-20931","trading_since":"March 2025","directors":["Priya Natarajan","Tom Okafor"]} documents_received: [{"kind":"Loan application form","date":"28 October 2026","pages":"4 of 4","signatures":"signed by Priya Natarajan"},{"kind":"Business bank statements","date":"July, August and September 2026","pages":"complete"},{"kind":"Passport","date":"valid until 2031","about":"Priya Natarajan"}]
- Answer (JSON)
- value incomplete, confidence 0.965
- Top options
- incomplete 0.965
- complete 0.034
- unclear 0.001
import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client: decide = client.function("jeff.reasoning.is-complete.is_complete", context={ "context": { "organisation": "A small business lender", "reviewer": "Loan operations analyst", "pack_kind": "Business loan application", "purpose": "Check the application pack is complete before credit review", "review_date": "2 November 2026", }, "checklist": [ "Signed loan application form (all pages)", "Business bank statements for the last three months", "Photo identification of every director", "Latest annual accounts (only for businesses trading more than two years)", ], }) decision = decide({ "case": { "name": "Ferngrove Bakery Ltd", "reference": "APP-20931", "trading_since": "March 2025", "directors": [ "Priya Natarajan", "Tom Okafor", ], }, "documents_received": [ { "kind": "Loan application form", "date": "28 October 2026", "pages": "4 of 4", "signatures": "signed by Priya Natarajan", }, { "kind": "Business bank statements", "date": "July, August and September 2026", "pages": "complete", }, { "kind": "Passport", "date": "valid until 2031", "about": "Priya Natarajan", }, ], }) print(decision.value, decision.confidence)
incomplete means at least one checklist item is not met: the bakery has two directors, but the pack contains
photo identification for only one (the annual accounts are not needed, as the bakery has traded for less than two
years).
Multiple-choice general knowledge
Multiple-choice general knowledge answers multiple-choice science, commonsense and general-knowledge questions by picking the right option. You pass the options as the labels. Here a pharmacy assistant is asked why a patient on warfarin needs more blood tests during a course of antibiotics:
Input
A patient taking warfarin is prescribed a course of antibiotics. Why should the patient's INR (a blood clotting test) be checked more often during the course?
Labels (the options)
- A
- Antibiotics neutralise warfarin in the stomach, so the dose stops working.
- B
- Some antibiotics can strengthen warfarin's effect and raise the risk of bleeding.
- C
- Antibiotics thicken the blood, so the patient is more likely to form clots.
- D
- Warfarin stops antibiotics from being absorbed, so the infection may not clear.
- Answer (JSON)
- value B, confidence 0.832
- Top options
- B 0.832
- C 0.078
- D 0.057
import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client: decide = client.function("jeff.knowledge.knowledge-qa.question", labels={ "A": "Antibiotics neutralise warfarin in the stomach, so the dose stops working.", "B": "Some antibiotics can strengthen warfarin's effect and raise the risk of bleeding.", "C": "Antibiotics thicken the blood, so the patient is more likely to form clots.", "D": "Warfarin stops antibiotics from being absorbed, so the infection may not clear.", }) decision = decide("A patient taking warfarin is prescribed a course of antibiotics. Why should the patient's INR (a blood clotting test) be checked more often during the course?") print(decision.value, decision.confidence)
B is the right option: some antibiotics strengthen warfarin's effect and raise the risk of bleeding. For a
question that depends on your own documents, pass the facts in or use a retrieval adapter instead.