Data insights

The cost of AI depends on context, not just tokens

November 13, 2026
The cost of AI depends on context, not just tokens
Fivetran and dbt give agents fresh data and governed business context, reducing the searches, retries, and corrections that inflate AI usage.

AI pricing conversations often stop at the model rate: how much a provider charges for 1 million input or output tokens. But enterprises do not buy tokens for their own sake. They pay for useful, reliable outcomes.

The total cost of an AI task depends on more than the price of each token. It also depends on how many tokens the model needs per attempt and how many attempts it takes to reach a correct answer:

Total AI cost = token price × tokens per attempt × attempts per correct answer

An agent without reliable context has to do more work. It searches across systems, reads extra documentation, inspects schemas, guesses which tables and definitions apply, writes a query, checks the result, and tries again when something does not line up. Each tool call, retrieved document, query result, explanation, and correction adds tokens.

A better model may reason through some of that ambiguity, but it still cannot know which revenue definition the CFO uses, which customer table is authoritative, or which field stopped updating last month — unless the organization provides that context.

This is where Fivetran and dbt create value. Fivetran keeps the underlying data current and reliable. dbt transforms that data into tested models with shared definitions, lineage, metadata, and documentation. Together, they give agents a shorter path to the right information, reducing the work required to produce an answer and the rework required to correct a bad one.

[CTA_MODULE]

Bad context makes agents do expensive detective work

Consider a seemingly simple question: “What was revenue last quarter?”

Without context, an agent may need to discover which systems contain bookings, invoices, refunds, and currency rates. It may inspect several tables, infer their relationships, choose between competing revenue fields, determine the company’s fiscal calendar, and decide whether the question refers to recognized or contracted revenue.

The model consumes tokens at every step. If it chooses the wrong table or definition, the first answer may look plausible but disagree with the finance team. A person then has to identify the mistake, explain the correct logic, and ask the agent to try again. The second attempt consumes another round of input, tool, and output tokens — and still depends on the agent correctly applying the correction.

That is the hidden cost of poor context. It is not only a larger prompt. It is the full loop of searching, guessing, validating, correcting, and rerunning.

Good context narrows the task. If the agent can immediately find the governed revenue metric, the approved model, the fiscal calendar definition, and the relevant lineage, it can retrieve less information and take a more direct path to the answer.

The exact token savings will vary by model and task, but the mechanism is straightforward: less searching and fewer failed attempts mean less unnecessary model usage.

Fivetran centralizes the data

An agent cannot reason reliably from data that is stale, incomplete, or scattered across manual exports. Before business context can help, the underlying facts must be available and current.

Fivetran automates the operational work of moving data from source systems into a warehouse or data lake and keeping it synchronized. Its connectors handle source-specific APIs, incremental sync logic, schema changes, and pipeline maintenance that engineering teams would otherwise manage themselves.

That reliability matters to AI economics. When the latest source data is already available in a consistent destination, an agent does not need to search across copies, reconcile conflicting extracts, or produce an answer that must be rerun when someone discovers the data was out of date. Fivetran reduces both the engineering work required before the model runs and the likelihood of token-consuming rework afterward.

dbt turns data into trusted context

Fresh data shows what happened. An agent also needs to understand what that data means.

After Fivetran moves data and metadata from across the business into a warehouse or lake, dbt transforms that raw data into version-controlled, tested, and documented models aligned with shared business definitions. Its catalog, metadata, lineage, and Semantic Layer establish which assets are trusted, how they relate, and how metrics should be calculated.

Together, Fivetran and dbt provide a repeatable approach to context engineering. Fivetran Context Layer combines current warehouse data with analytical metadata from dbt and context from documentation and operational systems. It then publishes that context to Agents Schema, a set of open, queryable tables in the customer’s warehouse or lake.

That means instead of loading an entire catalog, searching several applications, or inferring meaning from column names, an agent can retrieve the definitions and relationships relevant to its task. The goal is not to give the model as much context as possible. It is to give it the smallest set of trusted context needed to act correctly.

That can reduce token consumption in several ways:

  • Less discovery: The agent spends fewer tokens finding the right data, model, or definition.
  • Smaller context: It retrieves relevant information instead of everything that might apply.
  • Fewer failed queries: Governed models and lineage reduce guesswork about tables, joins, and fields.
  • Less correction: Shared definitions make the first answer more likely to match how the business measures the result.
  • More reuse: Context created once can support many analysts, agents, and operational workflows.

Good context therefore improves more than accuracy. It makes every model more efficient by reducing the work required to reach a reliable result.

Fewer attempts change the economics of AI

Model choice still matters. Teams should be able to use a more capable model when the work requires it and a lower-cost option when it does not. But the cheapest token rate does not necessarily produce the lowest total cost if poor context forces the model through repeated searches and retries.

The better measure is the cost of reaching a correct, usable outcome.

dbt Wizard demonstrates this principle. Wizard works with the models, lineage, metadata, tests, contracts, and project structure already in dbt rather than approaching every request as a general coding task. That project awareness helps it identify the relevant resources, make informed changes, run validations, and correct failures within the analytics engineering workflow.

Teams can choose among supported models with dbt-managed inference and pay model-specific rates for the tokens they consume. They can also bring their own API key and pay their chosen provider directly. The model can change without forcing the team to replace the project context and workflow that make it useful.

The lasting value is not access to 1 model. It is the foundation that helps any model do less unnecessary work.

That becomes especially important as natural-language interfaces make data accessible to more people and agents automate more analytical and operational tasks. Each new user, assistant, and workflow can multiply token consumption if every request begins with discovery and ends with correction. Reliable data and reusable context allow adoption to grow without waste growing at the same rate.

So when evaluating the cost of AI, ask 3 questions:

  • How much searching and context gathering must the agent do before it can reason?
  • How often does a person have to correct the answer and run the task again?
  • Does the platform provide reliable data and governed context that every model can reuse?

The value Fivetran and dbt provide is not AI attached to data. It is a shorter, more reliable path from question to answer — one that saves engineering time, limits unnecessary token consumption, and makes every model more useful.

[CTA_MODULE]

See how Fivetran enables agents to reach trusted answers in practice.
Get a demo
Explore how Fivetran helps agents reach trusted answers with less work.
Start a free trial
Share

Related blog posts

Start for free

Join the thousands of companies using Fivetran to centralize and transform their data.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.