Snowflake’s own BIRD-SQL test shows Cortex Analyst’s accuracy rising by approximately 20%, averaged across four datasets, from adding a proper semantic model to the same LLM. dbt Labs’ 2026 benchmark finds the same pattern outside Snowflake: the context the model reads moves text-to-SQL accuracy more than the vendor does.
Cortex Analyst is Snowflake’s managed product, built on Semantic Views and bundled with evaluation tooling. A custom text-to-SQL pipeline pairs any LLM with a team-built retrieval layer and whatever evaluation harness that team invests in. In both, accuracy depends on how well the context feeding the SQL generator is modeled, more than on which architecture generates the query.
| Dimension | Cortex Analyst | Custom Text-to-SQL Pipeline |
|---|---|---|
| What it is | Snowflake’s managed NL-to-SQL product, built on Semantic Views | A self-built stack: LLM plus schema/RAG plus your own prompt and retrieval layer |
| Accuracy driver | Semantic model quality (about 20% more accurate with a proper semantic model, same LLM) | Context and retrieval quality (84-90% to 98-100% with a modeled semantic layer, in dbt Labs’ benchmark) |
| Who owns it | Snowflake product; your team configures the semantic model | Your data or ML engineering team owns the entire stack |
| Evaluation tooling | Built-in: Verified Query suggestions, Evaluations feature | You build golden sets, regression tests, and eval harnesses yourself |
| Best for | Snowflake-centric teams without dedicated ML or eval engineering | Teams needing cross-warehouse queries or full pipeline control |
| Cost model | Snowflake consumption pricing; lower engineering overhead | Higher upfront engineering cost; more ongoing maintenance |
| Cross-system reach | Snowflake data estate only; no cross-turn prior-query context | Whatever you build it to reach, including across warehouses and systems |
| Complexity level | Low to medium (managed) | Medium to high (build and maintain) |
Cortex Analyst vs custom text-to-SQL: what’s the real difference?
Cortex Analyst and a custom text-to-SQL pipeline both translate natural-language questions into SQL, but they differ in who owns the accuracy problem and how it gets solved. Cortex Analyst is Snowflake’s managed product sitting on top of Semantic Views; a custom pipeline is whatever LLM-plus-retrieval stack a team assembles itself, distinct from the raw metadata a data catalog alone provides.
Semantic-layer-vs-text-to-SQL has been a live debate across dbt Labs, third-party analysts, and Snowflake’s own community through the first half of 2026, with both sides quoting “accuracy” numbers pulled from different eval methodologies. That’s why this page anchors on identical-LLM, cross-vendor benchmarks instead of a single vendor’s marketing figure.
The confusion comes from where teams draw the boundary between “which tool” and “what feeds it.” Text-to-SQL for the enterprise fails for the same reasons in both architectures, and the context layer vs semantic layer distinction matters here: a semantic layer generates SQL; a metric gives the agent the definition, with an owner and a version. This isn’t Snowflake-only, either. Teams evaluating a competing warehouse’s managed natural-language agent and its context requirements hit the identical pattern: the managed NL-to-SQL layer is only as accurate as the context underneath it.
For teams comparing Cortex Analyst and a custom pipeline, the more useful question is whether the context feeding either one settles the decisions a business question hides: which rows count, which quarter, which amount. Metrics written as SQL, each with an owner and a version, settle them. Descriptions and glossaries barely moved accuracy in Atlan’s published benchmark. Get that wrong, and the tool choice barely matters.
What is Snowflake Cortex Analyst?
Cortex Analyst is Snowflake’s natural-language query interface that translates questions into SQL against a semantic model, built on Semantic Views: logical tables, dimensions, facts, metrics, and relationships that tell the model what a business term means. Snowflake’s engineering blog publishes the accuracy tests behind it, covered below.
Tom Zayats, Senior Software Engineer at Snowflake, described the mechanism plainly: “This semantic model acts like a knowledge base, giving LLMs the context they need to understand user questions accurately, similar to how a human analyst would.”
Cortex Analyst’s own documentation is honest about its boundaries: it can’t access results from previous queries in a multi-turn conversation, it can’t generate broader business insights beyond SQL-answerable questions, and disabling models increases the risk of query failures. It sits alongside Snowflake CoCo and Snowflake CoWork, Snowflake’s other agent surfaces, on the same Horizon Context governance substrate, part of the broader context layer for Snowflake that spans every one of these surfaces.
Core components of Cortex Analyst
- Semantic model (YAML): defines logical tables, dimensions, facts, metrics, and relationships
- Verified queries: example questions with verified SQL that guide query generation, kept in the Verified Query Repository
- Evaluation: run your verified queries against Cortex Analyst to check the quality of a semantic view
Cortex Analyst’s own benchmarks make the point this whole comparison rests on: the same product, tested with and without a modeled semantic layer, produces a different accuracy number: about 20% higher with a proper semantic model, on Snowflake’s average. Between those two tests, only the context changed.
What is a custom text-to-SQL pipeline?
A custom text-to-SQL pipeline is a team-built stack that pairs an LLM with its own schema context, retrieval layer, and evaluation harness instead of a vendor’s managed semantic model, typically any LLM plus a retrieval layer injecting schema and business context into the prompt at query time, built and maintained entirely by the team that owns it. The semantic layer for AI agents a custom pipeline builds from scratch is the same layer Cortex Analyst gets bundled by default, and it’s worth being precise about what a context layer actually is before deciding how much of one to build in-house.
dbt Labs’ 2026 benchmark shows raw text-to-SQL overall accuracy roughly doubled between 2023 and 2026, from 32.7% to 64.5%, which still trails the semantic layer’s 72.7% on the same original schema in the same study. DIY pipelines can work for narrow, well-scoped domains, but a golden set of verified questions and ongoing regression testing are the cost most teams underinvest in. A custom pipeline also needs somewhere to keep business logic as definitions that run. The semantic layer and ontology comparison covers where entity relationships fit; an ontology earns its place on “why did the number move?” questions, once the numbers hold.
Core components of a custom text-to-SQL pipeline
- Schema/RAG retrieval layer: injects relevant table and column context into the prompt at query time
- Prompt engineering: structures the question plus retrieved context for the LLM
- Evaluation harness: golden-set regression tests a team must build itself, with no built-in equivalent to Cortex Analyst’s verified-query evaluation
- Guardrails: validation logic against dangerous or malformed query execution
A team that skips the evaluation harness accepts accuracy it can’t measure, and that is hard to notice until a business user stops trusting the answers. That gap, not the choice of LLM, is what separates a custom pipeline that reaches Cortex Analyst’s ceiling from one that plateaus well below it.
Inside Atlan AI Labs & The 5x Accuracy Factor
See the real experiments behind why context, not model choice, is what closes the gap between a text-to-SQL demo and a production-ready system.
Get the 5x Accuracy EbookCortex Analyst vs custom text-to-SQL: which is more accurate in practice?
The published benchmarks for each path point the same way: accuracy climbs once a proper semantic or context layer is added. Snowflake’s BIRD-SQL benchmark (March 2025) tested vanilla Claude 3.5 Sonnet against the same model wrapped in Cortex Analyst’s semantic model, across four datasets, with a human baseline of 93% for reference.
Snowflake reports an approximately 20% increase in accuracy, averaged across the four datasets, over the version without a proper semantic model.
Example: Q3 revenue query, two ways. A finance analyst asks “what was Q3 revenue?” Cortex Analyst resolves the fiscal calendar correctly only if the semantic model has that definition modeled; without it, the question silently defaults to a calendar-year assumption. A custom pipeline hits the identical failure unless its retrieval layer surfaces the same governed definition. Neither architecture gets this right by default. This is the concrete version of the page’s core claim: architecture doesn’t decide the outcome, context does.
| Dimension | Cortex Analyst | Custom Text-to-SQL Pipeline |
|---|---|---|
| Primary focus | NL query answering within Snowflake | NL query answering across whatever you connect it to |
| Key stakeholder | Analytics engineer configuring the semantic model | ML or data engineering team building and maintaining the stack |
| Measurement approach | Snowflake’s BIRD-SQL test (about 20% gain); evaluation by running verified queries | Whatever eval harness the team builds |
| Implementation scope | Configure a YAML semantic model (tables, dimensions, metrics) | Build retrieval, prompt engineering, schema context, and guardrails from scratch |
| Time to value | Days to weeks (managed product) | Weeks to months (custom build) |
| Tooling requirements | None beyond Snowflake and semantic model configuration | LLM API, vector store or RAG, evaluation framework, monitoring |
| Organizational impact | Business users get an existing UI and workflow | Team owns the full lifecycle: prompts, evals, guardrails, upgrades |
| Failure mode (managed) | Misconfigured semantic view; questions SQL can’t answer | Not applicable |
| Failure mode (custom) | Not applicable | Under-invested eval infrastructure; accuracy the team can’t measure |
| Governance surface | Semantic model plus Snowflake Horizon governance | Whatever glossary or context the team wires in themselves |
The honest takeaway from this comparison: Cortex Analyst reaches its ceiling faster because Snowflake has already built the evaluation loops and verified-query tooling a custom pipeline has to build from nothing. That head start is real. It just doesn’t change what the ceiling itself is made of.
What actually determines text-to-SQL accuracy: the model or the context layer?
Across every benchmark in this comparison, the same LLM scores higher when it queries a modeled context layer than when it queries raw schema. dbt Labs’ 2026 benchmark makes this explicit outside Snowflake entirely.
| LLM | Raw Text-to-SQL | Modeled Semantic Layer |
|---|---|---|
| Claude Sonnet 4.6 | 90.0% | 98.2% |
| GPT-5.3-codex | 84.1% | 100.0% |
Between 2023 and 2026, raw text-to-SQL overall accuracy roughly doubled, from 32.7% to 64.5%. Even in 2026, that still trails the semantic layer’s 72.7% on the same original schema in the same study. According to dbt Labs’ benchmark methodology (11 questions, 20 runs per question, four configurations tested across multiple LLMs), the pattern holds regardless of which model generates the SQL.
dbt Labs’ post puts the practical difference plainly: text-to-SQL sometimes returns plausible but wrong answers, while the Semantic Layer either answers a question it covers or says it can’t.
A short video from Atlan’s team unpacks this same boundary:
Scattered across different sources, the specific failure modes that degrade either architecture add up to one pattern:
- Hallucinated joins: the LLM invents table relationships instead of retrieving the real schema, a recurring AI agent hallucination pattern in agentic query generation
- Ambiguous business terms: Reddit practitioners trace failures to a “misconfigured semantic view,” not model choice, exactly what testing context quality for AI agents catches before shipping
- Stale schema assumptions: semi-structured fields and semantic layers that are “too broad” degrade accuracy in both architectures, the problem context freshness is built to catch
- Cross-turn context loss: Cortex Analyst cannot access results from previous queries in multi-turn conversations, a documented limitation, not a bug
None of these trace to model choice. That’s why AI agent accuracy work and evaluation benchmarks and metrics that catch failures before a business user does matter more here than which LLM generates the SQL, the same discipline behind building an AI agent harness that survives production.
How to test a semantic layer for AI agents
Cortex Analyst reads Snowflake semantic views, and a custom pipeline can read whatever semantic layer you already run. Snowflake semantic views name each metric per logical table and keep it inside the view, per Snowflake’s public documentation checked on 27 October 2026. Before either path goes to production, five questions show whether a layer holds up once agents are asking:
- When a metric definition changes, how many places have to change with it?
- Can an agent answer a question that spans two of your views?
- For a question your metrics cover, does the layer compile the SQL, or does the agent write it fresh?
- Does the same request compile to the same SQL every time, with no model in the loop?
- When someone corrects a wrong answer, does the fix change the definition, or get added beside it as a note?
If you have semantic views, keep them: they keep working for analysts, and their measures become candidate metrics. The questions come from the analytics agent playbook.
When to prioritize one over the other. Start with Cortex Analyst when your team is Snowflake-centric, has no dedicated ML or eval engineering resources, and needs business users querying quickly. Start with a custom pipeline when you need cross-warehouse queries, full control over evaluation and guardrails, or a narrow, well-scoped domain. When both matter, put the effort into one set of metrics both architectures read; a bigger model or a different vendor moves accuracy less.
Check Your Agent's Context Readiness
See whether the data feeding your Cortex Analyst semantic model or custom pipeline is governed enough to hit this ceiling.
Assess Your ReadinessHow Atlan’s context layer raises the accuracy ceiling for either path
Cortex Analyst and a custom pipeline are both agents, and both get more accurate when they read metrics that already settle the decisions a business question hides.
Teams treat this as a build-vs-buy decision when the evidence says it’s a context question. A UK retail group’s honest assessment, shared while evaluating Atlan’s Context Engineering Studio: standing up Cortex Analyst is quick, but “your data has to be just right for it to work.” The same is true for a custom pipeline. It just fails less visibly, because a wrong SQL query still returns an answer, just not the right one.
Atlan Trident holds the context your agents run on: certified metrics and saved queries in Metric Studio, each with its formula, source table, joins and dimensions, plus the evals and traces that show whether a change helped. Agents read your certified metrics and versioned model of the business before they query data, through one MCP connection, with the caller’s own permissions. The Analytics plugin builds those metrics from your dashboards and tables inside Claude Code, Codex, Cursor or GitHub Copilot. With every definition in one store any agent can read, moving between Cortex Analyst and a custom pipeline is only a wiring job; the playbook lays out the release paths for platform agents. Atlan Trident is in early access. Metric Studio and Ontology are in preview and need an administrator install, and the Analytics plugin is in preview.
A different mechanism, agent context enrichment rather than a modeled semantic layer, shows the same underlying pattern elsewhere in Snowflake’s own stack: per Snowflake’s CoWork blog (June 2026), in Snowflake’s internal testing on complex enterprise queries, frontier coding agents with Snowflake MCP reached 23% accuracy, CoCo and CoWork alone reached 47%, and CoCo and CoWork using Cortex Sense reached 83%. Different benchmark, same conclusion: context, not the agent surface or the SQL generator, sets the ceiling. The same architecture underlies a talk-to-data agent blueprint built for governed conversational analytics.
Atlan’s analytics agent playbook measured the same mechanism on one go-to-market warehouse, with 107 real questions each graded by code. Adding descriptions and documentation reached 39.3%, while AI-generated metrics and trusted past queries served per question reached 83.2% (the results). Context closes the gap, and the form it takes matters as much as how much of it there is. The same pattern Atlan documents in how to implement an enterprise context layer for AI is grounded in context engineering discipline.

One store of metrics and saved queries, read over MCP by whichever agent a team runs. Source: Atlan
Real stories from real customers: governed context, real query accuracy
"We're excited to build the future of AI governance with Atlan. All of the work that we did to get to a shared language at Workday can be leveraged by AI via Atlan's MCP server…as part of Atlan's AI Labs, we're co-building the semantic layer that AI needs with new constructs, like context products."
— Joe DosSantos, VP of Enterprise Data & Analytics, Workday
"Atlan is much more than a catalog of catalogs. It's more of a context operating system…Atlan enabled us to easily activate metadata for everything from discovery in the marketplace to AI governance to data quality to an MCP server delivering context to AI models."
— Sridher Arumugham, Chief Data & Analytics Officer, DigiKey
See Your Context Layer ROI
Calculate what closing the context gap is worth before you decide between Cortex Analyst and a custom pipeline.
Calculate Your ROISo, should you use Cortex Analyst or build custom text-to-SQL?
The build-vs-buy framing misses the point: both architectures hit the same accuracy ceiling, set by the same governed context layer, not a vendor choice, even though reaching that ceiling isn’t equally easy for both paths. Cortex Analyst gets you there faster if you’re Snowflake-centric and don’t want to build evaluation infrastructure yourself. A custom pipeline gets you more control if you need cross-warehouse reach, but only if your team invests in the golden sets and context modeling that Cortex Analyst bundles by default.
Don’t ask which tool is more accurate. Ask whether the numbers your business runs on are written down as metrics, in SQL, with an owner, so either one reads the same definition. That’s the actual question behind what the enterprise context layer is and the one this whole comparison keeps circling back to.
FAQs about Cortex Analyst vs custom text-to-SQL
1. What is the difference between Cortex Analyst and building your own text-to-SQL pipeline?
Cortex Analyst is Snowflake’s managed product built on a configurable semantic model. A custom pipeline is a team-built stack pairing an LLM with its own retrieval and evaluation layer. The determining factor for accuracy in either case is the quality of the context feeding the SQL generator, not which one you choose.
2. How accurate is Snowflake Cortex Analyst?
Snowflake’s BIRD-SQL test (March 2025) reports an approximately 20% increase in accuracy, averaged across four datasets, when Cortex Analyst uses a proper semantic model with the same underlying LLM. Real-world accuracy depends heavily on how well the semantic model is configured.
3. What are the limitations of Cortex Analyst?
Cortex Analyst cannot access results from previous queries in multi-turn conversations, and it is limited to questions that SQL can answer. Disabling models increases the risk of query failures, per Snowflake’s own documentation.
4. Can Cortex Analyst work without a semantic model?
No. Cortex Analyst answers from a semantic model: a semantic view, which Snowflake recommends, or a legacy YAML file on a stage. In Snowflake’s BIRD-SQL test, a proper semantic model raised accuracy by approximately 20% on average over the same LLM without one.
5. When should you use a managed text-to-SQL product instead of building your own?
Choose Cortex Analyst if your team is Snowflake-centric and lacks dedicated ML or evaluation engineering resources; it bundles evaluation tooling a custom pipeline must build from scratch. Choose a custom pipeline if you need cross-warehouse queries or full control over evaluation and guardrails.
6. How does Atlan improve Cortex Analyst or custom text-to-SQL accuracy?
Atlan Trident holds certified metrics and saved queries in Metric Studio, each with its formula, source table, joins and dimensions. Agents read your certified metrics and versioned model of the business before they query data, over MCP, with the caller’s own permissions. The Analytics plugin builds those metrics from your dashboards and tables. Atlan Trident is in early access; Metric Studio and Ontology are in preview and need an administrator install.
7. Snowflake semantic views vs a semantic layer: which works better for AI agents?
Snowflake semantic views are one kind of semantic layer: they group tables into a business-facing view, and each metric lives inside that view. For an agent, the test is where each metric lives and how far it reaches, so keep your semantic views for the analysts who use them and organize the agent’s context around the metric, with its formula, joins and verified SQL kept together. On one go-to-market warehouse with 107 real questions graded by code, semantic views as the only way in scored 38.3%. The five questions in the analytics agent playbook show whether your layer holds up.
Sources
- Agentic Semantic Model Improvement: Elevating Text-to-SQL Performance, Snowflake Engineering Blog
- Cortex Analyst official documentation, Snowflake
- Semantic Layer vs. Text-to-SQL: 2026 Benchmark Update, dbt Developer Blog
- The Six Failures of Text-to-SQL, Google Cloud/Medium
- Snowflake Text-to-SQL Magic, Medium/Snowflake
- Cortex Analyst in Snowflake, r/snowflake
- Is Cortex Analyst the Ultimate Text-to-SQL Tool for Snowflake Users?, Theodo
- Shifting Snowflake Cortex Analyst to Production Accuracy, Mastech Digital
- What we found: the results ladder, Atlan analytics agent playbook
- Snowflake CoWork: The Personal Work Agent for Every Knowledge Worker, Snowflake Blog