AI engineering glossary · Prompt context engineering

What is output parser?

Output parser: Code that reads the raw text of a model reply and turns it into a usable structure, for instance pulling out JSON, a list or text between tags. Good parsers handle stray text around the answer and report clear errors.

Level: intermediateTopic: Prompt context engineering

Output parser: an example

A parser finds the text between <answer> and </answer> and converts '42' into the integer 42.

Related terms

More Prompt context engineering terms

Where you learn it

Output parser is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.