Skip to main content

Lesson 1 · 9 min

Why unstructured output breaks in production

The failure modes that hit every team when they ship raw LLM text into real systems — and why better prompting alone does not fix them.

The raw-text trap

Your first LLM integration probably looks like this:

response = client.messages.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": f"Extract the invoice total from: {text}"}]
)
total = response.content[0].text  # "The total is $1,234.56"

This works in your demo. It breaks in production — not sometimes. Reliably.