01 / DefinitionWhat an AI data pipeline actually is
An AI data pipeline is a data workflow in which at least one transformation requires a model's judgement rather than a deterministic rule — classifying a supplier, reading a clause, normalising a product name — and in which that judgement is treated as production: work is handed out in batches, every output is checked before it is accepted, and the pipeline's state lives on a server rather than inside any one model session.
The second half of that definition is the part most stacks skip. Wiring an LLM call into a script is one afternoon of work, and it genuinely does the semantic step a regex never could. What it does not give you is a pipeline: there is no record of which rows were attempted, no check that what came back is right, and no way for tomorrow's run — or a different machine, or a different agent — to pick up where today's stopped.
The distinction matters because model output is not like transform output. A SQL
CAST either succeeds or throws. A model answering "is this company a
manufacturer or a trader?" always succeeds — the failure mode is a confident wrong
answer that looks exactly like a right one. Machinery that assumes transforms are either
correct or loud will wave those rows straight through.
02 / ContrastHow it differs from a classic ETL pipeline
ETL already solved orchestration, retries and scheduling — none of that needs reinventing. What changes is the trust model. A deterministic pipeline that runs green is done; a probabilistic one that runs green has merely finished. The differences concentrate in four places:
| Property | Classic ETL | AI data pipeline |
|---|---|---|
| Transform | Deterministic rule — same input, same output | Model judgement — same input, plausibly different output |
| Failure mode | Loud: exceptions, failed runs, red dashboards | Quiet: completed runs containing wrong rows |
| Unit of trust | The run — green means shippable | The row — each one accepted or refused on its own |
| Verification | Schema and volume checks at the end | Declared checks on every submission, plus spot-checks against pinned answers |
| Cost profile | Compute — cheap, scales with rows | Model calls — priced per token unless the work rides an agent's flat rate |
Notice what did not change: the destination. Both kinds of pipeline exist to produce tables that downstream tools can join, filter and build on. An AI pipeline that ends in a pile of JSON transcripts has not finished; it has just moved the tabulation problem to whoever reads them next.
03 / AnatomyThe five stages, and who owns each one
Strip any working AI data pipeline to its skeleton and the same five stages appear. Naming them matters less than noticing that ownership alternates between mechanical code and model judgement — and that mixing the two inside one stage is where quality goes to die.
- Collect. Crawlers, exports, APIs. Land everything append-only: duplicates are a fact about collection, not an error to hide, and a raw table you can re-derive from beats a "clean" one you silently overwrote. No model needed here.
- Clean. Dedupe by key, normalise encodings, fold obvious variants. Mechanical rules do this faster and more honestly than a model — and every row the cleaner rejects should be written down somewhere, because a row that vanishes without a record is the start of a reconciliation nightmare. Where a model does help with cleaning is its own question.
- Extract. The judgement step: grow the column the source never had. Manufacturer or trader. Standard clause or risky one. This is LLM data extraction, and it is the stage that makes the pipeline "AI" at all.
- Gate. Decide, per row and per batch, what gets accepted. Type and enum checks catch malformed output; spot-checks against rows with known answers catch the dangerous kind — well-formed and wrong. Output that skips this stage is opinion, not data.
- Consume. Accepted values land as real columns in a real table, joined to the source rows they came from — so BI tools, notebooks and the next pipeline can use them without knowing how they were made.
Stage 4 is the one with no classic-ETL ancestor, so most homegrown pipelines simply don't have it. The symptom is always the same sentence, asked weeks later: "can we actually trust these labels?" — and no record exists that could answer it.
04 / The real questionWhere the state lives decides everything
Here is the test that sorts real pipelines from demos. Kill the process mid-run — close the laptop, drop the session, lose the context window. What survives?
If the answer is "whatever the model remembers", you have an in-context pipeline: the batch cursor, the acceptance decisions and the reasons all live in a window that forgets. It works brilliantly for fifty rows. At five thousand, the early rows have slid out of the window, attention is spread across thousands of rows the model is not currently deciding about, and the failure is quiet — no error, just answers that drift. When the session ends, the run ends with it.
The alternative is server-side state: the pipeline — tables, batches, checks, verdicts, attempts — lives in a service, and model sessions come and go as workers. Any session can ask "what's next?", do a batch, submit it, and disappear. Progress is a fact about the server, not a memory inside a worker. Restart tolerance stops being a feature and becomes a property of the architecture.
This is the design argument behind how Tablize works, but it is not proprietary insight — any pipeline that outlives its sessions converges on the same shape: thin workers, durable line.
05 / OperationRunning the pipeline with a coding agent
The five stages used to require five tools and a human operator. A coding agent (Claude Code, Codex and their peers) collapses that: the agent crawls, cleans, pulls an extraction batch, computes it with the model it already runs on, submits, and asks for the next — while the server keeps the books. In practice the loop looks like this:
# the line and its contract live on the server
tablize import raw_suppliers.csv --new "Supplier listings · raw"
[OK] imported · 115 rows · 5 cols · append-only
# the agent pulls work in batches it can actually hold
tablize batch pull supplier-category --size 25
→ 25 rows · schema: {category: manufacturer | trader | unclear}
# …model does the judgement, agent submits…
tablize batch submit supplier-category ./answers.json
→ 23 accepted · 2 refused (enum violation · golden miss)
Two properties of this loop are worth stealing even if you build your own. First, the agent only ever holds the rows it was handed — context stays small no matter how large the table grows. Second, the model spend rides the flat-rate agent subscription instead of a per-token API bill, which changes the economics of running judgement over every row.
06 / ChecklistA build checklist you can argue with
- Raw tables are append-only; nothing edits history.
- Every stage's output is a table with a schema, not a transcript.
- The extraction schema is declared before the first batch runs — types, enums, required fields.
- Work is handed out in batches sized to what a model can hold well, not to what it can technically fit.
- Some rows in every run have answers pinned in advance, and the pipeline refuses batches that miss them.
- Every attempt — accepted or refused — lands on one ledger with model, batch and verdict attached.
- Killing every worker session loses no state.
Seven boxes. A stack that ticks all seven is a production line, whoever built it. A stack that ticks five is a good start with two incidents waiting.
07 / FAQQuestions that come up
Is an AI data pipeline just ETL with an LLM step?
No — the trust model inverts. Deterministic transforms are either correct or loud, so ETL checks runs. Model output can be confidently wrong, so an AI pipeline has to check rows: declared checks on every submission, spot-checks against known answers, and an account of what was accepted and why.
Do I need a vector database?
Not for this. Vector stores serve retrieval — finding passages relevant to a question. A pipeline's goal is columns: typed values that join and aggregate. If the output is a table, you need a schema and an acceptance record, not embeddings. RAG and pipelines can coexist, but they solve different problems.
What breaks first in a naive build?
Silent drift. Nothing throws; the answers just degrade as context fills or the prompt meets inputs it never anticipated. Without per-batch checks, drifted rows are indistinguishable from good ones until a downstream number looks wrong — which is the most expensive possible place to find out.
How do you validate LLM output at scale?
Layer two mechanisms. Declared checks — type, enum, range, format — judge every row mechanically and catch malformed output. Golden spot-checks hide rows with pre-pinned answers inside normal batches and refuse batches that miss them, which catches the well-formed-but-wrong output declared checks can't see. The extraction guide covers both in depth.
Can this run on a per-token API budget?
It can, but batch-pull architectures exist precisely because it rarely has to. When a coding agent computes the batches, the model spend rides the flat-rate subscription the agent already runs on, and the server's remaining job — state, checks, accounting — is cheap compute.
Adjacent reading, same production-line lens: