ML system design: Natural-language to spreadsheet formula assistant
Design an assistant that converts natural language requests into spreadsheet-style formulas for a no-code table product (similar to Airtable/Sheets).
Users and examples
Users type requests like:
-
“If
Status
is "Won" and
Amount
> 1000, return
Amount
* 0.1 else 0.”
-
“Extract the domain from the
Email
field.”
-
“Create a formula to label rows as "Late" if
Due Date
is before today and
Completed
is false.”
The system should output:
-
A
proposed formula
(in the product’s formula language),
-
A short
explanation
, and
-
Optionally a few
test cases / example evaluations
.
Requirements
-
Support ambiguous requests by asking
clarifying questions
.
-
Respect
table schema/context
(field names, types, missing values).
-
Be safe: avoid leaking data, and avoid destructive actions.
-
Latency target: e.g., P95 < 2–3s for interactive usage.
-
Provide a plan for
quality evaluation
and
iteration
.
What to cover
-
End-to-end architecture (client, orchestration, model calls, tools).
-
Schema grounding and type checking.
-
Handling ambiguity and multi-turn refinement.
-
How you validate formulas (static + dynamic checks).
-
Offline/online evaluation metrics and datasets.
-
Failure modes and mitigations (hallucinated fields/functions, incorrect edge-case logic).