AI Dictionary › Prompting

Output Parsing

Parsing dell'Output

Definition

Output parsing is the code-side process of extracting and transforming the model's raw response into the data structure you need, also handling cases where the model does not perfectly follow the requested format. It is the bridge between generated text and usable data. Example: the model should return pure JSON but sometimes wraps it in a markdown block ```json ... ```; your parser strips the fences, runs JSON.parse, and on failure applies recovery (remove trailing commas, request a rewrite). Many libraries provide "output parsers" with auto-retry and schema validation.

Use it whenever you integrate a model into a real system: never trust the output 100%. A good parser includes validation, defaults and error handling, so an imperfect response does not crash the pipeline.

Definizione (italiano)

L'output parsing è il processo, lato codice, di estrarre e trasformare la risposta grezza del modello nella struttura di dati di cui hai bisogno, gestendo anche i casi in cui il modello non rispetta perfettamente il formato richiesto. È il ponte tra testo generato e dati utilizzabili. Esempio: il modello dovrebbe restituire JSON puro ma a volte lo avvolge in un blocco markdown ```json ... ```; il tuo parser rimuove i delimitatori, esegue JSON.parse, e se fallisce applica una strategia di recupero (rimuovere virgole finali, richiedere una riscrittura). Molte librerie offrono "output parser" con retry automatico e validazione dello schema.

Usalo sempre che integri un modello in un sistema reale: non fidarti mai dell'output al 100%. Un buon parser include validazione, valori di default e gestione degli errori, così una risposta imperfetta non manda in crash la pipeline.

Related terms

More in Prompting

From our network

Kaimaki Web — Websites That Win Customers

Custom websites, web apps and digital marketing for growing businesses.

Visit kaimakiweb.com →

From the Agora Intelligence blog

More on agora-intelligence.com →

📱 Download the Android app (beta) iOS coming soon

Say what you mean. Get what you need.

Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.