WarUI

Natural Language to Query AST

GRID-A27-F14P0beyond-baselinePlanned

Natural-language prompts are translated into a typed query AST (filters, sorts, groups, aggregations) rather than into code or raw strings. The AST is the only artefact that can affect the grid, and it is validated against the current schema. This keeps translation inspectable and safe.

Planned. This page shows the specification from issue #207. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

Orders grid with a prompt bar using the deterministic mock provider.

Expected behavior

Translating returns an AST shown as JSON and as a readable sentence. Nothing is applied until the user confirms in preview. Invalid AST output is rejected with an explanation.

Planned API surface

grid.ai.translate(prompt)QueryAstQueryAst.schemaVersiononTranslationgrid.query.fromAst(ast)

Acceptance criteria

  • The AST conforms to the published schema (pending)
  • Relative dates resolve against a configurable reference clock (pending)
  • translate() never mutates grid state (pending)
  • An AST referencing excluded columns is rejected (pending)