ĸĸ Cortex Analyst vs Custom Text-to-SQL: Accuracy Guide [2026]

Cortex Analyst vs Custom Text-to-SQL: Which Is More Accurate?

Emily Winks, Data Governance Expert, Atlan
Data Governance Expert
Updated:07/29/2026
|
Published:07/29/2026
18 min read

Key takeaways

  • Snowflake's BIRD-SQL benchmark shows the same LLM jump from 57% to 78% just by adding a semantic model to Cortex Analyst.
  • dbt Labs' 2026 benchmark finds the same pattern outside Snowflake: modeling beats raw text-to-SQL by 8-16 points.
  • DIY pipelines commonly plateau at 60-70% accuracy without dedicated evaluation infrastructure, per Reddit reports.
  • Atlan's MCP server delivers the same governed context to Cortex Analyst and to custom pipelines alike.

Cortex Analyst vs custom text-to-SQL: which is more accurate?

Cortex Analyst and a custom text-to-SQL pipeline both turn plain-English questions into SQL, and the evidence says the choice between them isn't what decides the accuracy ceiling. Snowflake's own BIRD-SQL benchmark shows a semantic model lifting the same LLM from 57% to 78%, and dbt Labs' 2026 benchmark shows the identical pattern entirely outside Snowflake. Cortex Analyst still reaches that ceiling faster, since it bundles evaluation tooling a custom pipeline must build itself. Atlan supplies the governed context layer that raises the ceiling for both, delivered through its MCP server.

Key facts include

  • Snowflake BIRD-SQL benchmark: same LLM, 57% without a semantic model vs. 78% with one
  • dbt Labs 2026 benchmark: 90-100% with a modeled semantic layer vs. 84-90% on raw text-to-SQL
  • DIY ceiling: custom pipelines commonly plateau at 60-70% without dedicated evaluation infrastructure
  • Atlan angle: one governed context layer, delivered to Cortex Analyst and custom pipelines alike via MCP

Is your data estate AI-agent ready?

Assess Your Readiness

Snowflake’s own BIRD-SQL benchmark shows Cortex Analyst’s accuracy jump from 57% to 78%, a 21-point lift, purely from adding a semantic model to the identical LLM. dbt Labs’ 2026 benchmark finds the same pattern entirely outside Snowflake: modeling the semantic layer, not the vendor, is what moves text-to-SQL accuracy.


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. Reddit practitioners commonly report DIY pipelines plateauing at 60-70% accuracy without dedicated eval infrastructure, while Snowflake markets 90%+ accuracy “within Snowflake boundary.” Both figures describe the same underlying variable from different angles: how well the context feeding the SQL generator is modeled, not 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 (57% to 78% with modeling, same LLM) Context and retrieval quality (84-90% to 98-100% with a modeled semantic layer)
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?

Permalink to “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 defines what the data means, but it doesn’t certify whether that meaning is current or trustworthy. 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 real question isn’t which tool answers questions correctly more often out of the box. It’s whether the context feeding either one, the business glossary, the certified relationships, the freshness signals, is good enough to make either architecture accurate. Get that wrong, and the tool choice barely matters.


What is Snowflake Cortex Analyst?

Permalink to “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 own reference docs state no quantified accuracy figure; accuracy claims live in Snowflake’s blog and marketing content instead. A Snowflake-affiliated Medium post separately claims 90%+ accuracy “based on internal benchmarks and all metadata and data within Snowflake boundary,” a caveat worth noticing before taking the number at face value.

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

Permalink to “Core components of Cortex Analyst”
  • Semantic model (YAML): defines logical tables, dimensions, facts, metrics, and relationships
  • Verified Query suggestions: pre-validated query patterns the model can draw from
  • Evaluations feature: Snowflake’s built-in mechanism for testing model accuracy against a question set
  • Scope boundary: cannot generate SQL beyond the established semantic layer, a real brittleness point for ad hoc questions outside the modeled scope, and a gap that Snowflake Cortex training alone doesn’t close

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 dramatically different accuracy number. The tool isn’t what changed between those two tests. The context did.


What is a custom text-to-SQL pipeline?

Permalink to “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%, a real trend that still trails a modeled semantic layer’s 72.7% overall accuracy in the same study. Reddit sentiment is consistent: DIY pipelines can work for narrow, well-scoped domains, but a “golden set” of verified questions and ongoing regression testing are the hidden cost most teams underinvest in. A custom pipeline also often needs pieces of both a semantic layer and an ontology, business logic and entity relationships, to reach parity with a managed semantic model.

Core components of a custom text-to-SQL pipeline

Permalink to “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 Evaluations feature
  • Guardrails: validation logic against dangerous or malformed query execution

A team that skips the evaluation harness isn’t just accepting lower accuracy. It’s accepting accuracy it can’t measure, which is a harder problem 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 Ebook

Cortex Analyst vs custom text-to-SQL: which is more accurate in practice?

Permalink to “Cortex Analyst vs custom text-to-SQL: which is more accurate in practice?”

Head-to-head, Cortex Analyst’s published benchmarks outperform typical unmodeled custom pipelines, but the gap closes sharply once either side adds a proper semantic or context layer. Snowflake’s BIRD-SQL benchmark 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.

Dataset Vanilla LLM Cortex Analyst + semantic model Lift
Debit Card 52% 83% +31pp
California Schools 63% 80% +17pp
Thrombosis 45% 70% +25pp
Toxicology 69% 79% +10pp
Average 57% 78% +21pp

Snowflake’s own 90%+ accuracy claim is explicitly scoped as “within Snowflake boundary,” the seam this comparison exists to probe. Reddit practitioners estimate custom pipelines can reach 60-70% accuracy cheaply, but trust collapses once, in their words, “1/3 to 1/2” of questions return errors or wrong data, even as they separately note Snowflake’s own marketed claim of 92%+ for Cortex Analyst.

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 benchmark (+21pp); built-in Evaluations feature Whatever eval harness the team builds, often none, per Reddit signals
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; can’t answer beyond established scope —
Failure mode (custom) — Under-invested eval infrastructure; plateaus at 60-70% accuracy
Governance surface Semantic model plus Horizon Context glossary (H2 2026 roadmap) 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?

Permalink to “What actually determines text-to-SQL accuracy: the model or the context layer?”

Across every benchmark in this comparison, the same LLM produces dramatically different accuracy depending on whether it queries raw schema or a modeled context layer. 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 a modeled semantic layer’s 72.7% overall accuracy 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.

Jason Ganz, Director of Community, Developer Experience and AI at dbt Labs, put the practical difference this way: “With text-to-SQL, failure looks like a plausible but incorrect answer. With the Semantic Layer, failure looks like an error message.”

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.

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, a governed context layer feeding both architectures is what pays off, not a bigger model or a different vendor.

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 Readiness

How Atlan’s context layer raises the accuracy ceiling for either path

Permalink to “How Atlan’s context layer raises the accuracy ceiling for either path”

Atlan doesn’t compete with Cortex Analyst or a custom pipeline. It supplies the governed context layer that determines how high either one’s accuracy ceiling goes.

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’s Enterprise Data Graph and Context Engineering Studio generate and validate the governed business glossary, certified relationships, and freshness and ownership signals a semantic model needs, whether that model lives inside Cortex Analyst’s Semantic Views or a custom pipeline’s retrieval layer, an approach Atlan + Snowflake’s integration architecture covers in more depth. Atlan’s MCP server delivers that same governed context to either architecture at runtime, the concrete “works for both paths” proof point, not a claim that erases the real effort gap between managed and DIY, and how Horizon Context and Atlan’s context layer work together extends that pattern across Semantic Views specifically. 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), frontier coding agents connecting via Snowflake MCP alone reach 23% accuracy on complex enterprise queries, agents using Snowflake CoWork without added context reach 47%, and the same agents with Snowflake’s own runtime context layer reach 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.

In a joint benchmark with Snowflake Intelligence, context-enriched metadata, column descriptions, glossary terms, and lineage from Atlan, improved talk-to-data SQL-generation accuracy 3x over schema-only prompts across 145 queries (p < 2e-10). A separate, earlier 522-query benchmark found enhanced metadata delivered a 38% relative improvement in AI-generated SQL accuracy (p < 0.0001). Neither number competes with dbt Labs’ third-party research; both confirm the same mechanism from a different architecture: context, not a bigger model, closes the gap. The same pattern Atlan documents in how to implement an enterprise context layer for AI is grounded in context engineering discipline.

One governed context layer feeding both Cortex Analyst Semantic Views and a custom text-to-SQL pipeline

Atlan’s governed context layer, business glossary, certified relationships, and freshness signals, delivered via MCP, feeds both Cortex Analyst’s Semantic Views and a custom pipeline’s retrieval layer. Source: Atlan


Real stories from real customers: governed context, real query accuracy

Permalink to “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 ROI

So, should you use Cortex Analyst or build custom text-to-SQL?

Permalink to “So, 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.

The honest takeaway: don’t ask which tool is more accurate. Ask whether your business glossary, certified relationships, and freshness signals are good enough to make either one accurate. 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

Permalink 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?

Permalink to “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?

Permalink to “2. How accurate is Snowflake Cortex Analyst?”

Snowflake’s BIRD-SQL benchmark shows Cortex Analyst with a semantic model reaching 78% average accuracy versus 57% without one, using the same underlying LLM. Snowflake’s own marketing content separately claims 90%+ accuracy “within Snowflake boundary.” Real-world variance depends heavily on how well the semantic model is configured.

3. What are the limitations of Cortex Analyst?

Permalink to “3. What are the limitations of Cortex Analyst?”

Cortex Analyst cannot access results from previous queries in multi-turn conversations, cannot generate insights beyond SQL-answerable questions, and cannot generate SQL beyond its established semantic layer. Disabling models increases the risk of query failures, per Snowflake’s own documentation.

4. Can Cortex Analyst work without a semantic model?

Permalink to “4. Can Cortex Analyst work without a semantic model?”

No. Cortex Analyst’s accuracy depends on a configured semantic model built on Semantic Views. Without one, accuracy drops to the 57% range seen in Snowflake’s own BIRD-SQL benchmark, roughly matching an unmodeled custom pipeline’s typical range.

5. When should you use a managed text-to-SQL product instead of building your own?

Permalink to “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?

Permalink to “6. How does Atlan improve Cortex Analyst or custom text-to-SQL accuracy?”

Atlan’s Enterprise Data Graph and Context Engineering Studio generate and validate the governed business glossary and certified relationships that a semantic model needs, then deliver that context to either Cortex Analyst’s Semantic Views or a custom pipeline’s retrieval layer via Atlan’s MCP server.


Sources

Permalink to “Sources”
  1. Agentic Semantic Model Improvement: Elevating Text-to-SQL Performance, Snowflake Engineering Blog
  2. Cortex Analyst official documentation, Snowflake
  3. Semantic Layer vs. Text-to-SQL: 2026 Benchmark Update, dbt Developer Blog
  4. The Six Failures of Text-to-SQL, Google Cloud/Medium
  5. Snowflake Text-to-SQL Magic, Medium/Snowflake
  6. Cortex Analyst in Snowflake, r/snowflake
  7. Is Cortex Analyst the Ultimate Text-to-SQL Tool for Snowflake Users?, Theodo
  8. Shifting Snowflake Cortex Analyst to Production Accuracy, Mastech Digital
  9. Making Talk to Data 3x More Accurate, Atlan
  10. How We Proved Metadata Delivers 38% Better AI Accuracy, Atlan
  11. Snowflake CoWork: The Personal Work Agent for Every Knowledge Worker, Snowflake Blog

Share this article

signoff-panel-logo

Atlan is the Context Layer for AI, a Leader in the Gartner Magic Quadrant for D&A Governance (2026) and the Forrester Wave for Data Governance (Q3 2025). Atlan unifies your data, business knowledge, and the meaning behind your terms into one Enterprise Data Graph that gives every team and every AI agent the trusted context they need. Trusted by Mastercard, Workday, General Motors, CME Group, HubSpot, FOX, Virgin Media O2, Elastic, and 400+ enterprises representing $10T+ in market cap.

Bridge the context gap.
Ship AI that works.

[Website env: production]
ĸĸĸĸ