BD Brain Drip
📐
Module 05 8 concepts

Structured Output & Format Control

JSON, XML, structured generation, and output formatting.

01

Classification and Labeling Output

Classification and labeling output techniques use prompt design, label space engineering, and output constraints to reliably sort LLM inputs into predefined categories with calibrated confidence. Prerequisites: None.

02

Constrained Decoding from the Prompt Perspective

Constrained decoding uses grammar-based filtering, regex constraints, and schema enforcement at the token level to guarantee structural output validity, complementing prompt-based format control. Prerequisites: json-mode-and-schema-enforcement.md.

03

Extraction and Parsing Prompts

Extraction and parsing prompts instruct LLMs to locate, identify, and structure specific information from unstructured text into defined fields, bridging the gap between raw documents and structured databases. Prerequisites: json-mode-and-schema-enforcement.md.

04

JSON Mode and Schema Enforcement

JSON mode and schema enforcement ensure LLM outputs conform to machine-parseable JSON structures through API-level constraints, prompt design, and external validation. Prerequisites: None.

05

Markdown and Rich Text Output

Markdown output prompting controls how LLMs format responses with headers, tables, lists, and code blocks, enabling consistent, readable, and structured human-facing content. Prerequisites: None.

06

Multi-Step Output Pipelines

Multi-step output pipelines chain multiple LLM calls where each step’s structured output feeds as input to downstream code or prompts, enabling complex tasks through decomposition. Prerequisites: json-mode-and-schema-enforcement.md, extraction-and-parsing-prompts.md.

07

Output Length Control

Output length control uses prompt instructions, parameter settings, and structural techniques to manage the trade-off between brevity and completeness in LLM responses. Prerequisites: None.

08

XML and Tag-Based Output

XML and tag-based output uses labeled opening and closing tags to structure LLM responses, excelling at nested mixed content, human readability, and seamless integration with Anthropic’s Claude models. Prerequisites: None.