Skip to content
Forward Deployed

Forward Deployed
System Design Practice

Natural-Language-to-SQL Analytics Assistant

By Sourav Banerjee · Last updated 12 Oct 2026 · Report an issue

Read the worked design: Natural Language over Governed Data

PracticeAdvanced4 min read
For
Engineers preparing for Forward Deployed, solutions or applied-AI engineering interviews
Assumes
  • Two or three Discovery Foundations scenarios completed
  • Comfort with retrieval, agents, queues and multi-tenant cloud architecture
Objectives
  • Find the one constraint that makes the scenario dangerous before designing
  • Defend an architecture, evaluation plan and rollout under follow-up questions
How to use it
Allow about an hour. Work the discovery sections properly — they decide the design — then compare each section with the model answer and score yourself honestly.

Condensed from the sources credited on the How It Works page

0/36
Not saving
01

Interview prompt

Your GenAI FDE (Forward Deployed Engineer) task is a Natural-Language-to-SQL Analytics Assistant. Every week, executives repeat the same questions, and analysts turn each one into a query by hand. The worst outcome is not broken SQL. It is SQL that runs cleanly but answers a different business question from the one asked.

02

Clarify the customer problem

  • Who defines each metric, and how often does a definition change?
  • Is there a semantic layer already, or do we have to build one?
  • Does the warehouse enforce row and column security today?
  • Which warehouses and SQL dialects must we support?
  • If a question is ambiguous, should the assistant ask back, decline or hand it to an analyst?
03

Users and workflows

UserWorkflowCurrent painAI assist opportunityHuman approval needed?
Executive
Analyst
Data / platform engineer
Metric owner
04

Requirements

Functional

Non-functional

  • Latency target
  • Availability target
  • Cost budget
  • Security/privacy constraints
  • Audit/compliance requirement
05

Data and integration map

Data sourceFormatOwnerFreshnessPermission modelRisk
06

Proposed architecture

Pick a rendered diagram as your starting point and adapt it to this case. Cover each part below:

  • Metric registry
  • Schema retrieval
  • Ambiguity check
  • AST and policy validation
  • Read-only execution
  • Monitoring
07

Evaluation plan

MetricGood thresholdBad thresholdTest datasetOwner
Semantic correctnessAgrees with the analystEven one unflagged mismatchGolden cases of question plus SQLAnalytics lead
Policy violationsNone get throughAny that get throughAudit of query runsSecurity team
Bytes scanned per answerAt or under baselineMore than 20% overTelemetry from the warehouseData platform team
User trust scoreAt or above the launch targetFalls two periods runningFeedback captured in the productProduct team
08

Failure modes

  • The SQL runs but answers the wrong business question
  • A schema change quietly breaks a saved template
  • A join multiplies rows and inflates totals
  • A query reads far more data than it needs
  • The written summary disagrees with the result table
  • Policy blocks leave users frustrated
09

Rollout plan

  1. Start with ten governed metrics, each with a named owner.
  2. Build golden cases: question, SQL and expected result.
  3. Re-run the golden set on every change.
  4. Shadow the analysts; their answer stays the source of truth.
  5. Open to executives once the answers match.
  6. Grow one domain at a time.
10

Weak vs strong answer

Weak: "I'd give the model the schema, let it write SQL and run whatever comes back."

Strong: "Before touching any table, I'd map the question to a governed metric. If the question is ambiguous, I'd ask rather than guess. I'd parse the SQL into an AST (abstract syntax tree), check it against policy and a scan budget, run it read-only, and prove the whole thing on ten metrics with golden cases."

11

Candidate scorecard

Evaluation
The closer

Final 2-minute spoken answer

Rehearse this out loud before you look at it. Summarising the whole design in two minutes is its own skill, and it is usually the last thing you are asked for.

Where next

Read the worked design
Natural Language over Governed Data
Revise the concepts