Apply UX Skills to GenAI

Agent Experience (AX)

AX: Prefer Concrete (Code First, Model Second)

In software development, we never rely on conversational guesswork when a deterministic utility exists. We build CI pipelines that run automated test suites, validate strict schemas, and filter logs before browsing them with zero tokens spent.

Yet in GenAI engineering, we can routinely over-delegate to the model without thinking: asking an LLM to self-reflect, calculate values for us, or check for specific strings in the code and make a todo list of items to clean up.


3 Core Patterns of "Prefer Concrete"

1. Concrete Document Assembly (Templates > Raw Output)

  • The Anti-Pattern: Asking an LLM to generate raw markdown tables or complex .docx/PDF structures from scratch, which frequently results in broken nesting and dropped columns.
  • The Fix: Have the agent extract pure, structured JSON data, then pass it to a local template engine (OpenXML, HTML-to-PDF) to compile a valid, pixel-perfect document shape every time.

2. Concrete Math & Aggregations (Compute in Runtimes)

  • The Anti-Pattern: Asking an LLM to calculate totals across a 500-row invoice or compute currency conversions inline.
  • The Fix: Have the agent identify the line items and parameters, then let a 0-token runtime script execute the arithmetic with deterministic precision.

3. Concrete State Audits & Pre-Flight Checks (Hard Truth)

  • The Anti-Pattern: Asking an agent, "Did you successfully update the database?" or firing unchecked raw model payloads at an external API.
  • The Fix: Intercept payloads with local schemas (Zod/Pydantic) before execution, and confirm side effects with real SQL queries or API status codes rather than conversational confirmation.

The Economics: Zero-Token Reality

Offloading structural certainty to standard runtimes yields two immediate wins:

  1. Absolute Stability: Code doesn't hallucinate justifications. A schema either validates or throws a structured error; a database row either exists or it doesn't.
  2. Zero-Token Latency: Spend model tokens where LLMs excel - semantic understanding, reasoning, and unstructured extraction - and let concrete software handle the rest.