NLQ — Natural Language to SQL
The LLM receives the database schema and generates SQL from a plain question.
User: "What topics came up most in cost-mgmt-dev last month?"
LLM: [SYNTHESISE]
SELECT substr(text, 1, 120) as snippet, timestamp
FROM messages
WHERE channel_id = (SELECT id FROM channels WHERE name = 'cost-mgmt-dev')
AND timestamp >= unixepoch('now', '-1 month')
ORDER BY timestamp DESC
LIMIT 100
[SYNTHESISE] mode: when the LLM prefixes its response with this tag, the results (up to 100–1000 rows, configurable) are sent back to the LLM which returns a plain-English summary instead of a raw table.
Answer: "Last month cost-mgmt-dev focused on three themes:
(1) GCP quota increases requested by the infra team (12 messages, week of Jun 3),
(2) Budget alert thresholds — a spike of 23 messages on Jun 11 after an alert fired,
(3) Discussion of spot vs on-demand instance cost tradeoffs (ongoing, 8 participants)."