logo

Beta

Get Started

Introduction

Core Concepts

Utilities

Integrations

Resources

Precontext

copy markdown

Precontext allow you to access the detailed results from specialized processes that Interfaze runs internally to process your requests. These outputs provide transparency into the multi-step processing that happens behind the scenes, giving you access to intermediate results like OCR data, structured extractions etc.

Accessing Precontext

The precontext key in the response contains an array of pre-process execution results. Each execution includes the process name and its detailed output, allowing you to see exactly what specialized processing was performed to answer your query.

Examples

Note: LangChain SDK does not provide an official way to access raw API responses, so we cannot include an example for that SDK at this time.

OpenAI SDK

Vercel AI SDK

...

Understanding the Output Structure

Each index in the precontext array contains:

  • name: The name of the specialized process used (e.g., "ocr", "extraction", "analysis")
  • result: The detailed output from that process, containing structured data specific to the task

Example OCR Output Structure

...