You can query historical inferences to analyze model behavior, debug issues, export data for fine-tuning, and more. The TensorZero UI provides an interface to browse and filter historical inferences. You can also query historical inferences programmatically using the TensorZero Gateway.Documentation Index
Fetch the complete documentation index at: https://www.tensorzero.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Query historical inferences by ID
HTTPPOST /v1/inferences/get_inferences
TensorZero SDK client.get_inferences(...)
Retrieve specific inferences when you know their IDs.
Request
List of inference IDs (UUIDs) to retrieve.
Filter by function name. Including this improves query performance if your
observability backend is ClickHouse.
Source of the output to return:
"inference": Returns the original model output"demonstration": Returns human-curated feedback output (ignores inferences without one)"none": Returns the inference without output
Example
Example
- TensorZero Python SDK
- HTTP
You can retrieve inferences by ID using the TensorZero Python SDK.
Response
Query historical inferences with filters
List inferences with filtering, pagination, and sorting. HTTPPOST /v1/inferences/list_inferences
TensorZero SDK
client.list_inferences(request=ListInferencesRequest(...))
Request
Cursor pagination: get inferences after this ID (exclusive). Cannot be used
with
before or offset.Cursor pagination: get inferences before this ID (exclusive). Cannot be used
with
after or offset.Filter by episode ID (UUID).
Advanced filtering by metrics, tags, time, and demonstration feedback. Filters can be combined using logical operators (
and, or, not).Filter by function name. Including this improves query performance if your
observability backend is ClickHouse.
Maximum number of results to return.
Pagination offset.
Sort criteria. You can specify multiple sort criteria.
Source of the output to return:
"inference": Returns the original model output"demonstration": Returns human-curated feedback output (ignores inferences without one)"none": Returns the inference without output
Full-text search query (experimental, may cause full table scans).
Filter by variant name.
Example
Example
- TensorZero Python SDK
- HTTP
You can list inferences with filters using the TensorZero Python SDK.