What is precontext in Interfaze?
Precontext is an array Interfaze returns on the ordinary chat-completions response, alongside your structured answer, containing the raw output of the specialist models it ran. For OCR that means per-word text, confidence scores, and bounding boxes — the verifiable metadata a general LLM has no way to produce.
Last updated 2026-07-20
What's in it
Each precontext entry names a task it performed (such as `ocr` or object detection) and a `result` with a fixed, predictable schema. For OCR the result nests sections, then lines, then words — each word carrying its text, a confidence score, and its bounds on the page.
Why it exists
Interfaze fuses specialist encoders into the transformer. Those encoders produce measured metadata — bounding boxes, per-word confidence — that a single monolithic model can't emit reliably. Precontext surfaces that metadata to you instead of discarding it.
How you use it
It arrives on the normal response, next to your structured `object`. Read the confidence and bounds and map them to your extracted fields. For streaming responses, enable it with the request header `x-show-additional-info: true`.
FAQ
Do I have to request precontext?
It comes back on the normal (non-streaming) response automatically. For streaming, add the x-show-additional-info: true header.
Does precontext map to my schema fields?
No — it's raw OCR words and lines. You match your extracted values against them to attach confidence and a box per field.