Lumen
Demo access

Governed analytics

Every figure shows its working

Ask a question about a synthetic retail bank. Lumen answers it, then shows the query, the rows and the route it took to get there.

The token stays in this browser tab and is cleared when you sign out.

  1. QuestionPlain language
  2. RouterPicks the path
  3. Semantic layerCertified metrics build the SQL
  4. WarehouseSynthetic bank data
  5. AnswerText, rows, SQL, trace
  1. No certified metric matches
  2. Text-to-SQLA model writes the SQL
  3. SQL guardChecks it before it runs
On every answer Full trace Cited sources Daily budget
Illustrative example
-- "NPA ratio by product type"
SELECT product_type,
       ROUND(100.0 * npa_amount / loan_amount, 2)
         AS npa_ratio_pct
FROM   certified_metric_npa_ratio
GROUP BY product_type;

route          812 ms   metric
plan_metric     20 ms   npa_ratio
execute         14 ms   6 rows
Lumen

Governed analytics over a synthetic retail bank

0 / 2000

Try a question

Thinking...

How to try this

  1. Pick an example, or type your own question.
  2. Open SQL to see the exact query that ran.
  3. Open How it was answered to see the route.

A certified metric is answered from the governed semantic layer, so the query comes from tested definitions rather than from a model. When no certified metric matches, the model writes SQL and a guard checks it before it runs.

What Lumen does

Ask a business question in plain language about a synthetic retail bank: spend, loans, cards, complaints, or the bank's own policies. Lumen answers it, then shows its working: the exact SQL that ran, the rows it returned, and the route it took to get there.

How a question is answered

  1. 1. QuestionYou type a question. It is checked against your token's daily budget.
  2. 2. RouterA model decides the path: a certified metric, a free-form data question, or a policy document.
  3. 3a. Semantic layerFor a certified metric, a deterministic compiler builds the SQL from tested definitions. No model writes this SQL.
  4. 3b. Text-to-SQL, guardedWhen no metric fits, a model writes the SQL and a guard parses and checks it before it runs.
  5. 3c. Policy documentsPolicy questions are answered from the bank's documents, with the sources cited.
  6. 4. WarehouseQueries run with a row cap and a time limit. Columns marked PII are masked as ***.
  7. 5. AnswerText, rows, the SQL and a step-by-step trace of how it was reached.

What makes it different

  • Certified numbers. Common metrics come from tested definitions, so the same question gives the same figure every time.
  • Every answer shows its working. Open SQL and How it was answered on any result.
  • Guarded fallback. Free-form SQL is only run after the guard has checked it.
  • Measured. Behaviour is checked against a golden set of 47 questions.
  • Open interfaces. The same engine is available as a REST API and as an MCP server.

Built with

FastAPI, LangGraph, sqlglot, SQLAlchemy and SQLite for this demo (the warehouse layer also supports Postgres), running on Google Cloud Run.

Where to look next

The Data model tab shows the tables and how they join. The Data tab shows real rows from each one. Then go back to Ask and try a question.

Certified metrics

The business measures Lumen has tested definitions for. When a question matches one, the SQL is built from the definition shown here, not written by a model, so the same question gives the same figure every time.

Policies

The bank documents behind policy questions such as fees, KYC and card terms. When you ask one, Lumen answers from these files and cites the section it used. The documents are fictional.

Data model

The eight tables behind the demo bank and how they join. Lines run from a foreign key to the column it points at.

Core tablesActivity tablesReference tablesCrow's foot = many, double bar = one. Hover a table to highlight its links.

Data

Real rows from the demo database. Pick a table to see its first 20 rows.