← Blog
July 8, 20266 min readSeldon

Seven signs an LLM call has become a stable workflow that code could run

Technical debtLLM opsArchitecture

Teams that prototype with prompts often leave business logic inside those prompts long after the workflow has stabilized, and that logic becomes technical debt. This essay gives a seven-signal checklist for finding the LLM calls that ordinary code, a smaller model or a data pipeline could now run.

This is an essay. It reports no new measurement. The examples from practitioners come from an informal, anonymous discussion, and the numbers they gave are their own reports.

Prompts hold logic that the rest of the codebase cannot see

A conventional backend has functions, schemas, tests, validators and typed data. A prompt chain often has none of them. It can still contain business rules, parsing assumptions, routing logic and validation criteria, written in natural language.

That makes failures hard to trace. A bad output could come from wrong source data, failed retrieval, an overlong prompt, a model update, schema drift or a new edge case. One participant in our discussion asked how a company supports a customer whose data was mangled when the logic lives inside a model whose output can vary.

Cost makes the problem visible. Model calls can grow faster than users, because one user action can fan out into many calls. But the debt is the hidden logic, and it stays even when the bill is acceptable.

What practitioners told us

We asked a group of startup founders, operators and builders one question: how much production LLM usage is open-ended reasoning, and how much is repeated extraction, classification, normalization or routing? We have not named them, and we did not verify their figures.

  • Fine-tuned replacement. One founder used a frontier model for classification early on, then replaced it with a smaller fine-tuned model running locally. They reported a cost reduction of about 90%. The hardest part was getting the team to prioritize the migration while the GPT-based version still worked.
  • Cold-start labeling. Another builder used an LLM to classify notes until it had produced enough labeled data, then replaced it with a cheaper classifier.
  • Tiered routing. An operator described regex and rules for the predictable 80%, cheaper models for simple high-volume tasks, caching for repeated entities, and frontier models only for ambiguous cases.
  • Migration to pipelines. A data professional with more than a decade of experience starts with LLMs, then moves stable extraction and transformation into Python and data pipelines. They described LLMs at scale as costly, slow and high-variance for that kind of work.

Another participant asked what share of production LLM calls teams actually measure by workflow type. Without that measurement, a team cannot tell reasoning calls from extraction calls or from formatting calls.

Treat the LLM as the prototype layer

An LLM lets a team work out the shape of a workflow before committing to a data model. It handles messy inputs, proposes structure and generates early labels. Starting there is often the right choice. The debt appears when the prototype stays the production runtime after the workflow has stopped changing.

Exploration · frontier modelProduction · deterministic + fallbackAmbiguous taskPrompt prototypeRepeated usageStable I/OExplicit schemaCompiled + fallback
Fig. 2 — A workflow matures from exploration to production

For each production call, ask whether it is doing reasoning or data engineering. Many calls do familiar data tasks: extract a field, classify a ticket, normalize a company name, convert a note to JSON, or match a customer to an account.

In a mature system, the model moves from the hot path, where every request pays for it, to the exception path. A cheaper route handles the requests it is confident about, and the model handles the rest.

BEFOREEvery requestFrontier LLMOutputevery request pays the frontier costAFTERCompiled pathFrontier LLMEvery requestconfidence gate≈10%Frontier LLM≈90%Deterministic, cache,classifier or small modelOutput
Fig. 3 — Move the frontier model from the hot path to the exception path

Instrument calls by workflow first

The checklist needs traces. Record for each call the prompt family, input type, model, token count, latency, cost, output schema and downstream action. Also record whether the response was accepted, edited, retried or discarded.

Group calls by workflow rather than by endpoint. A team might find groups such as "extract support ticket category," "normalize vendor names" or "convert call transcript into CRM update." Then plot the groups by volume and ambiguity. High-volume, low-ambiguity groups come first.

COMPILE FIRSTRoute / cache / cheaper modelLow ROI — leave for nowKeep frontier LLMExtract fieldsClassify ticketNormalize entitySummarize callDraft follow-up emailDraft GTM strategyOpen-ended Q&ARare one-off parselow ambiguityhigh ambiguity →↑ volume
Fig. 4 — Which calls to compile first

A workflow is a poor candidate when the task is open-ended, the output is subjective, the context changes widely between requests, or the value comes from creative synthesis.

The seven signals

1. Repeated prompt families

The same template runs hundreds or thousands of times, such as "Extract the following fields from this document" or "Classify this ticket into one of these categories." Repetition is the first sign the task has stabilized.

2. Structured outputs

The model mostly returns JSON, tables, labels, scores or constrained summaries. The team already knows the shape of the answer. The next question is whether a parser, classifier, extraction model, SQL query or ETL job can produce that shape.

3. Low-variance decisions

The answers come from a small set: ticket category "billing," risk level "medium," document type "invoice," route "human review." This is a classification problem. A small fine-tuned model, an embedding classifier, a gradient-boosted model or rules may be enough.

4. Repeated entity resolution

The model matches names, vendors, customers, products, tickers or documents against internal records. At scale this belongs in an entity-resolution pipeline with canonical IDs, aliases, fuzzy matching, confidence scores and a human review queue.

5. Outputs you can validate

Code can check the result. The JSON matches the schema, the date parses, the currency code exists, the line items sum to the total, or the category is in the allowed list. Validation makes a replacement safer, because failed outputs can go back to the model.

6. High volume and low ambiguity

Replacing a rare strategy-generation call changes little. Replacing a million monthly calls that convert text into a known schema can change margins. One way to rank candidates:

Compilation priority =
  volume × cost × repetitiveness × schema stability × validation ease

7. Hidden data models

Users keep asking the model the same questions: which accounts are at renewal risk, which contracts have unusual terms, which prospects need follow-up. The fix may be a table, not a better prompt. Examples include renewal_risks, contract_clause_flags or opportunity_next_actions. The LLM traffic shows the data model the company has not built yet.

Migrate one workflow at a time

Put each workflow in one of five groups:

  • Keep on the frontier model
  • Route to a cheaper model
  • Cache or retrieve
  • Replace with traditional ML or NLP
  • Rebuild as backend logic or ETL

The target architecture is tiered. Rules and parsers handle most traffic, classifiers and small models handle the next layer, and the frontier model handles the ambiguous remainder.

Rules, regex, parsersTraditional ML / classifiersSmall language modelsFrontier LLMsmosttrafficrarecost per call ↑Compiled / deterministicFrontier LLM
Fig. 5 — A tiered architecture: cheap by default, frontier at the tip

Start with the workflow that has the clearest schema, the highest volume, the easiest validation and the largest cost:

  1. Build a deterministic or smaller-model version.
  2. Run it in shadow mode beside the current LLM path.
  3. Compare the outputs.
  4. Shift traffic to it gradually.
  5. Keep the LLM as the fallback for low-confidence or unfamiliar inputs.

Seldon Functions automates steps 1 and 3 for a call with a fixed input and output schema. The quickstart describes the current workflow.

What the LLM traffic teaches

Using an LLM to find out what a product should do is not the debt. The debt is not knowing which calls have become stable workflows. A team that logs calls by workflow, validates outputs and keeps a fallback can answer that question. The traffic shows which entities recur, which decisions repeat and which tables should exist. Those answers are the specification for the code that replaces the prompt.

Open beta

Route your traffic through Seldon and investigate recurring work that could benefit from a specialized program.

Sign up for open beta →
Seven signs an LLM call has become a stable workflow that code could run | Seldon