liveBook · Manning

Post-processing

As explained in Data Analysis with LLMs

Postprocessing is the processing of generated outputs after model generation to filter, evaluate, or select results.

Post-processing turns a language model’s raw answer into usable results. For text extraction, the model returns a text string, so additional processing must recover attribute values and place them in a structured table. section 4.3.1

A reliable extraction workflow separates generation from cleanup:

  • Define the attributes, source text, delimiters, and missing-value placeholder in the prompt. section 4.3.1
  • Extract the table region between <BeginTable> and <EndTable> so preambles and explanations do not enter the data. section 4.3.3
  • Split the region into rows by newline symbols and fields by pipe symbols, then trim fields and discard empty values. section 4.3.3
  • When several answers are generated, evaluate or execute them and discard unsuitable results, such as SQL queries with syntax errors. section 3.5.3

Extracting applicant data

Given an email stating that Martin studies Computer Science at Stanford and has a 4.0 GPA, the model can return | Martin | 4.0 | Bachelor of Computer Science |. Post-processing converts this delimited text into a row such as ["Martin", "4.0", "Bachelor of Computer Science"].

How Data Analysis with LLMs covers it

How deep it goes
Explains delimiter-based parsing and answer selection, stopping short of broader validation or model internals.
Examples
Uses applicant emails, delimited table rows, Python parsing, and executable SQL candidates as examples.
What it assumes
Assumes a language-model prompt and raw response, while teaching the extraction format and parsing steps explicitly.
What you can do after
Apply it via Python and regular expressions to parse model output or filter multiple generated answers.
How it connects
Connects text extraction, prompt engineering, structured data, SQL queries, and text classification.

Also explained in

Compare how 4 books explain post-processing →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Analysis with LLMs. The section links point to the parts of the book it draws on.