Submit a Story

Glossary term

Output Parser

Updated Oct 17, 2026

In short

A component that converts a model’s response into a structured value and checks whether it matches an expected format.

An output parser takes the model’s generated text and turns it into data that application code can use, such as an object, list or typed record. Depending on the design, it may parse JSON, validate required fields, normalize values or return a clear error when the response is malformed.

If a model returns a date as "next Friday", a parser can reject it or convert it to a standard format using a defined reference date. A good parser returns specific errors, such as a missing total field, so you can retry with that feedback using retry logic or send the case to a person. Clear error handling keeps one bad response from breaking a run.

Parsing is not the same as verifying truth. Validate content and business rules separately, and define a safe fallback when parsing fails instead of silently accepting partial data. Related: Structured Output, JSON Mode.