Search⌘ K
AI Features

The Case Study

Explore how to interpret requirements and design a natural-language text-to-SQL analytics agent for a global retailer within strict constraints. Understand key considerations like data privacy, regional access, performance targets, stakeholder roles, and how to handle real-world evidence from prior pilots to prepare a feasible and accountable deployment plan.

About 4,000 warehouse tables describe the retailer’s data estate; one business domain defines the requested first release. Reading those two phrases correctly is the first engineering decision in this case.

Your task is to turn the mandate into a bounded delivery interpretation while keeping missing decisions visible.

This first complete rehearsal concerns a data-heavy, single-agent deployment. It applies BigQuery, semantic modeling, permissions, and evaluation from Chapters 2–3.

The complete brief

Read the customer record before choosing an approach. The retailer is fictional and unnamed; preserve that identity throughout the case.

  • Customer: 2,800 stores in 14 countries. Its BigQuery warehouse contains about 4,000 tables accumulated over a decade by different teams.

  • Business problem: About 1,200 merchandising and supply-chain analysts depend on a central BI team for every new question. That team has a three-week backlog.

  • Previous attempt: An internal Gemini Text-to-SQL pilot built last year looked good in demos but answered only about 38% of real questions correctly. It was shelved.

  • Mandate: Put a natural-language analytics agent into production for one business domain within 90 days.

  • Data access: Regional managers may see only their own region’s data. Franchise data is separate from corporate data.

  • Privacy: Loyalty-program data contains personally identifiable information, or PII.

  • Residency: EU data must stay in EU regions.

  • Latency: Answers within 15 seconds at p95.

  • Cost: A cap on BigQuery scan cost per query.

  • Stakeholders: The VP of Merchandising sponsors the project. The skeptical Head of Data Platform owns BigQuery. The BI team lead worries about replacement. The privacy officer reviews data use. Category managers are end users.

The deliverable sentence you can defend is: “Deliver a production natural-language analytics agent for one business domain within 90 days, subject to the stated data, performance, and cost constraints.”

The 2,800 stores and 14 countries explain the environment’s scale. They do not require the initial release to support every store, market, or table. Likewise, “production” requires evidence that the release can support its intended work under its operating conditions; ...