neesh Inc.
AI StrategyEngineering CostArchitecture

The AI Tax

What it actually costs to make LLMs production-ready. The 80% of AI product engineering that has nothing to do with AI.

The API call takes 3 seconds. The infrastructure around it took 3 months.


Every AI product demo follows the same script: call the API, get a response, show the result. Three steps. A weekend project.

Then you ship it to real users and discover that the LLM call is the easy part. The hard part — the part that takes 80% of the engineering time — is everything around it: validating unpredictable responses, handling timeouts across chunked pipelines, preventing double-charges on concurrent requests, and building fallback tiers so users always get a result.

We call this the AI tax — the infrastructure cost of making an LLM feature production-ready. It’s invisible in demos, absent from tutorials, and consistently underestimated by 5-10x.

What stakeholders imagine

1

User Input

Text, files, or a question

2

LLM Call

Send to the model, get a response

3

Display Result

Show the output to the user

Three steps. Clean. This is what gets budgeted for.

What actually ships

The real pipeline for a single AI feature has seven infrastructure layers surrounding the LLM call. Each layer exists because we shipped without it and watched it fail.

1

Preprocessing

Date extraction (chrono-node), document summarization (HuggingFace BART), chunking at sentence boundaries with overlap

2

Input Validation

Zod schema validation on every input. Prompt injection defense via input sandwiching. Domain-specific parsing guidance injection.

3

Timeout Management

AbortController on every fetch. Per-chunk timeout budgets. Total pipeline timeout that prevents one slow chunk from stalling everything.

4

Response Validation

Tier 1: full Zod schema validation. Tier 2: validate individual items if full schema fails. Tier 3: regex extraction from raw text as last resort.

5

Billing Guard

Check balance before execution. Run the AI pipeline. Charge only on success. Atomic database update prevents race-condition overdrafts.

6

Error Recovery

Summarization falls back to intelligent truncation. Parsing falls back to partial results with warnings. Users always get something.

7

Cleanup

Assistants and uploaded files deleted in finally blocks. No orphaned resources. Credit refunds on failure. Audit trail on every transaction.

Where the engineering time actually goes

This is what the proportion looks like across two shipped AI products (Chronologiq and RecommendMe):

Preprocessing
Validation
Timeouts
Response handling
Billing
Error recovery
Cleanup
Prompts + LLM
Preprocessing 18%
Validation 15%
Timeouts 8%
Response handling 15%
Billing 14%
Error recovery 12%
Cleanup 6%
Prompts + LLM 12%

The highlighted segment — the actual LLM prompt engineering — is 12% of the total effort. Everything else is the tax.

The seven layers, unpacked


The takeaway

If you’re scoping an AI feature, multiply your LLM-integration estimate by 5-8x. That’s not pessimism — it’s the real cost of:

  • Making outputs trustworthy (validation + grounding)
  • Making failures invisible (recovery + fallbacks)
  • Making billing fair (charge-on-success)
  • Making the pipeline resilient (timeouts + cleanup)

The LLM call is the seed. The tax is the garden.

Already paying the AI tax? We can audit your pipeline.

Book Free Assessment