Provide a reference date and the candidate dates. Leave room for ambiguity when the text has no precise deadline.
Input and workflow
Generate candidate dates using application timezone rules. Parse the selected ISO date in code, retaining the original note for ambiguous relative expressions.
Request
{
"model": "ngila-judge",
"state": {
"today": "2026-11-21",
"note": "Please deliver tomorrow."
},
"questions": {
"deadline": {
"type": "choice",
"instructions": "Choose the intended delivery date.",
"criteria": {
"2026-11-21": "",
"2026-11-22": "",
"Unspecified": ""
}
}
}
}Run locally
Save ngila.py alongside your script and set NGILA_API_KEY. Save any linked input images in the same directory.
import json
from ngila import NgilaClient
state = {'today': '2026-11-21', 'note': 'Please deliver tomorrow.'}
questions = {'deadline': {'type': 'choice',
'instructions': 'Choose the intended delivery date.',
'criteria': {'2026-11-21': '',
'2026-11-22': '',
'Unspecified': ''}}}
response = NgilaClient().system_one(state, questions)
a = response["answers"]
print(json.dumps(a, indent=2, ensure_ascii=False))Use the answers
The following application fragment uses a = response["answers"]. Supply any thresholds, lookup tables, or previous results from your workflow before applying it.
date = a["deadline"]["choice"]
resolved = None if date == "Unspecified" else date