Everyone talks about semantic layers for AI. Nobody talks about how loading all of it defeats the purpose.

By Alejandro Aboy

Published: 2026-05-21

URL: https://thepipeandtheline.substack.com/p/progressive-disclosure-the-core-pattern


Hi there! Alejandro here 😊
Subscribe if you like to read about technical data & AI learnings, deep dives!
Enjoy the reading and let me know in the comments what you think about it 👨🏻‍💻

📝 TL;DR

  • Most analytics agents load all schema and semantic metadata upfront. That’s the fastest path to context rot and hallucinated queries.
  • Progressive disclosure is a UX principle: show only what’s needed now, reveal more on demand.
  • Three-layer approach: Discover → Understand → Execute
  • Caveat: Loading your entire semantic layer every time is the same flat-context trap with better guidance.
  • None of this works if your metadata is garbage.

⚠️ Disclaimer: this breakdown will be focused on analytics agents for data use cases. We will mention concepts such as database schemas, SQL fundamentals and semantic layers, but all these could be relevant for agentic use cases where excessive context can downgrade performance.

Here’s how a typical analytics agent setup could look like today:

You connect the agent to your warehouse and it loads the full schema: 200 tables, 3,000 columns, all their descriptions, all the business logic documented, example queries, and maybe some semantic layer definitions on top.

Then someone asks: “What’s our Q4 revenue by region?”

The agent has 10 tables competing that could answer that question and everything looks equally important.

Then the model picks whatever seems right and executes with full confidence.

I wrote about this problem in What’s the real deal about SKILLs: adding more capabilities to an agent without managing when they’re loaded is the formula for disaster. Context rot is a design problem that compounds with every tool you add.

The same applies to analytics: Every table description, every column definition, every business rule you add to the system prompt is competing for the model’s attention. And attention is finite.

Demos out there will tell you that a Text2SQL agent just needs access to the database and brief explanation on when to use each table and in which fashion.

The cognitive failure you’d hit with a huge consideration list is the same one an LLM hits, yet with zero self-awareness that it’s wrong.

There’s a lot you can work on human readiness as I explored in my previous article with Modern Data 101.


Progressive Disclosure: From UX to Agent Architecture

Jakob Nielsen defined progressive disclosure as: show only what’s needed now, defer everything else. All in the name of reducing cognitive load.

Think about how a good analyst onboards, they:

  • Start with the schema overview and don’t read every table definition on day one.
  • Zoom into the tables relevant to their first task.
  • Learn from edge cases and business logic come when they hit specific problems.

Instead of transferring that knowledge to Analytics Agents, we’re giving them the entire schema on startup and wondering why they’re confused.

wrote about data teams becoming context teams, context engineering as the new core skill. Curating context means deciding when and how much of it enters the agent’s reasoning, because cutting the noise and letting through the right thing will consistently serve high output quality.

’s semantic layer for AI onboarding piece makes the point clearly: semantic context is the difference between an agent that guesses and one that reasons. But even great onboarding doesn’t mean handing someone 400 pages on day one. Good onboarding is progressive.


The Three Layers: Discover → Understand → Execute

Here’s how progressive disclosure translates into analytics agent design. Three layers, each adding depth only when needed.

Layer 1: Schema Discovery

The agent starts with a compressed view of your catalog. A table of contents: domain name, table name, grain, one-line summary.

We should ask ourselves: what’s the only thing an Agent needs to understand about a table to decide if it’s relevant for the query or not?

This is the frontmatter equivalent from SKILLs, it works like an index. The agent knows what exists without loading the full instructions, for example:

table: fact_orders description: Shop order breakdown with amount, currency conversation, purchased item details, net and gross values. relationships: dim_region on customer_id

Then when the agent gets a question such as “Q4 revenue by region?”, it can think:

That’s ecommerce domain. I can use fact\orders for revenue and dim\customers for region.

The better the information trigger, the better and shorter the interaction count to get the right thing. This is the first step of the plan and it only saw what tables to use at this point.

Layer 2: Semantic Loading

Only now, for the selected tables, we load the full semantic context: column definitions, business logic, edge cases, join relationships.

Now the agent knows things such as:

  • revenue\net\usd excludes refunds (use revenue\gross\usd for gross)
  • test orders are filtered.
  • More details join path to dim\_customers.
  • date can be used to filter by quarters with some transformations.

Rich context, but only for what matters!

Layer 3: Query Execution

With the right context loaded, the agent plans and executes. It selects fact\orders joined to dim\customers, applies the date filter for Q4, sums revenue\net\usd grouped by region, knowing refunds are already excluded by design because Layer 2 told it so.

Three layers with progressive depth and our lovely agent never sees what it doesn’t need 😍


The Pipe & The Line is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.


Why Static Semantic Layers Aren’t Enough

The semantic layer is essential. Without clear definitions of revenue, active users, or region logic, agents hallucinate with full confidence.

Here’s the thing: loading your entire semantic layer into context is just another version of the flat context trap.

50 tables defined in Cube, dbt metrics, or Looker, all dumped into every session.

The greatest approach becomes better data modeling from scratch:

  • Adding AI ready business context descriptions
  • Being specific on filtering approaches
  • Cleansing data properly to avoid noise that can confuse AI
  • Pre-computing complex metrics at the model level (but don’t overdo OBT)
And the hardest: try to avoid a situation where multiple tables could get the same thing, cut as much as possible and you will have great years ahead of you with your analytics agents.

Metric selection ambiguity is the greatest source of hallucinated SQL.

This will mix layers 1 and 2 when the agent is getting semantically confused on the discovery step.

The semantic layer should earn a place for its complexity only when data modelling complexity grows beyond certain baseline. Don’t add layers until the simpler approach breaks.

The semantic layer needs its own index layer. A compressed representation that lets the agent decide what to load before it loads anything.

Sounds familiar, right?

Tools like The Boring Semantic Layer (BSL) by expose list\models → describe\model → query\_model via MCP: basically three-layer discovery, but scoped to one library.

# Layer 1: discover what models exist (no schema loaded yet)

list_models()

# → ["fact_orders", "dim_customers", "fact_sessions"]

# Layer 2: load semantic context for selected model only

describe_model("fact_orders")

# → measures, dimensions, filters, business logic, join relationships

# Layer 3: query with full context in scope

query_model( "fact_orders", measures=["revenue_net_usd"], dimensions=["region"], filters={"quarter": "Q4"} )

The LLM never writes SQL. It writes semantic queries against a model that already encodes the business rules. Hallucinations drop because there’s nothing ambiguous left to hallucinate.

Recommended: Data Engineers Are Becoming MetadataOps Engineers


Thanks for reading The Pipe & The Line! This post is public so feel free to share it.


Where Do We See It Today

You’ve been using progressive disclosure without knowing it (and I mean beyond Skills.)

Claude Code’s Deferred Tools

That Tool loaded. message in Claude Code or the equivalent on claude.ai is pure progressive disclosure in action.

Claude Code has access to dozens of skills and tools, such as Bash, Read, Edit, WebSearch among others.

Your claude.ai has connected MCPs that needs to check before trying anything with those tools, because they haven’t been discovered by Claude yet.

Loading all their JSON schemas upfront burns a bunch of tokens before Claude does anything.

And that’s when you get deferred tools. When Claude needs WebSearch, it calls ToolSearch, fetches the schema on demand, and the tool becomes available without polluting the context.

FastMCP: BM25 Search and Code Mode

FastMCP implements this as composable server-side transforms.

BM25 Search Transform wraps all tools behind a search\_tools endpoint. The agent describes what it needs in natural language, BM25 ranks by relevance, only top matches load into context. It has some of its fundamentals similar to how RAG searches with vectors work if you need a proxy concept.

Code Mode goes further. Instead of calling tools one by one (intermediate results bloating context), the agent writes Python that orchestrates multiple calls in a sandbox environment. Only the final result re-enters context. It exposes meta-tools with graduated detail: get\tags() → search\tools(query, "brief") → get\_schemas([...]) → execute(script). Same 3 layers pattern applied to tools.

This pattern isn’t just for warehouse queries. It applies anywhere agents interact with data infrastructure.

Database Discovery with Postgres MCP

Connect Postgres MCP and the agent gets 20+ tools plus your full schema. Context bomb.

The three-layer fix: list\schemas + list\tables first (names and row counts, no columns).

Then execute\_sql on selected tables only (columns, constraints, relationships).

Then get\query\plan before executing. The agent navigates your catalog instead of loading it.

Same pattern we demonstrated in End To End Agentic Data Modeling. OpenMetadata MCP does searchEntities → getEntityDetails → impact analysis. Two-layer progressive disclosure out of the box.

Think Bigger: Pipeline Debugging with Multi-Layer Log Scanning

A failed Airflow DAG produces logs across scheduler, worker, task instance, and downstream quality checks. Loading all of that is the flat context trap applied to operations.

Each MCP call scoped to the specific entity the previous layer pointed to. Not “here’s everything, figure it out.”

Recommended: Claude Code For Data Engineers (Skills, MCPs & Hooks) (the Airflow MCP + Hooks setup is the foundation for this).


Where We’re At

Progressive disclosure isn’t new, we have been seeing it for decades. We have semantic layers, metadata catalogs and MCPs (or CLIs, don’t bite me) to connect them all.

The missing piece is the architecture. Most teams still dump everything into context and hope the model figures it out. They load the full schema upfront because loading parts of it seems harder than loading all of it.

But progressive disclosure helps discovering what matters first is faster than loading everything and filtering noise. And as your agent complexity grows the savings compound.

The principle is constant: defer loading expensive context until an agent has a reason to load it. Attention is finite. Use it wisely.


If you enjoyed the content, hit the like ❤️ button, share, comment, repost, and all those nice things people do when like stuff these days. Glad to know you made it to this part!


Alejandro Aboy's avatar

Hi, I am Alejandro Aboy. I am currently working as a Data Engineer. I started in digital marketing at 19. I gained experience in website tracking, advertising, and analytics. I also founded my agency. In 2021, I found my passion for data engineering. So, I shifted my career focus, despite lacking a CS degree. I’m now pursuing this path, leveraging my diverse experience and willingness to learn.