Skip to content
Enterprise

Text-to-SQL AI Assistant: ask your tables a question. See what leaves the cluster.

The AI Assistant writes SQL from your semantic layer and runs it on your cluster under your own permissions. As shipped, Ask Data sends no result row to any model.

10 rows in.
0 rows out.

As shipped, egress is off: the model never sees row values.

Stays in your clusterThe whole result, in the console

Which ten customers had the most high-risk payments, with email?

customer_idcustomer_statehigh_risk_paymentsemail
C00000001California17[email protected]
C00000086New York8[email protected]
C00000008Texas7[email protected]
C00000043Texas7[email protected]
C00000883California7[email protected]
C00000003Colorado6[email protected]
C00000586Florida6[email protected]
C00001526Texas6[email protected]
C00000006New York5[email protected]
C00000016Colorado5[email protected]

The model, at a third partyWhat the gate hands the model, verbatim

Result shape only (egress off): 10 rows; columns: customer_id, customer_state, high_risk_payments, email. No values disclosed.

The ledger row it writes egress_eventsegress_mode offrows_in 10rows_out 0

What leaves your cluster when you ask.

The model gets your question and the names in your semantic layer, writes SQL, and your cluster runs it. Of the result, the model reads only what the egress gate lets through. Pick a question, a privacy level and where the model runs.

Ask
Privacy level

The model never sees row values.

Governed, k-anonymous aggregates only.

A masked sample; caps degrade gracefully.

Full masked values (classified data still capped).

The model runs

location: local LOCAL

location: external REMOTE_THIRD_PARTY

As shipped, the organization’s egress mode is off and every level acts as Maximum. Here an administrator has raised it, and a level only narrows it.

Stays in your clusterThe whole result, in the console

categorypaymentsvolume_usd
travel278972306639028
electronics356439178744646
atm733518131557225
e-commerce1023109129169185
grocery1613606116720438
apparel65009692028769
utilities28535249873951
restaurants83553846296795
health57801736000151
fuel52661235624763
entertainment37314019727431
customer_idcustomer_statehigh_risk_paymentsemailCONFIDENTIAL · masked
C00000001California17[email protected]
C00000086New York8[email protected]
C00000008Texas7[email protected]
C00000043Texas7[email protected]
C00000883California7[email protected]
C00000003Colorado6[email protected]
C00000586Florida6[email protected]
C00001526Texas6[email protected]
C00000006New York5[email protected]
C00000016Colorado5[email protected]

The gate’s warning, beside the answer

None, nothing was capped.

Egress capped from 'sampled' to 'aggregate' because INTERNAL data is going to REMOTE_THIRD_PARTY. Switch to a local model for more detail.

Egress capped from 'full' to 'aggregate' because INTERNAL data is going to REMOTE_THIRD_PARTY. Switch to a local model for more detail.

Blocked: CONFIDENTIAL data cannot be sent to REMOTE_THIRD_PARTY, so nothing was shared with the model. Switch to a local model to get 'aggregate' detail.

Egress capped from 'sampled' to 'off' because CONFIDENTIAL data is going to REMOTE_THIRD_PARTY. Switch to a local model for more detail.

Egress capped from 'full' to 'off' because CONFIDENTIAL data is going to REMOTE_THIRD_PARTY. Switch to a local model for more detail.

The ledger row it writesegress_events

egress_mode offmodel_destination LOCALclassification_tier INTERNALrows_in 11rows_out 0suppressions 0content_hash f6a22e6ae533adb1columns ["category","payments","volume_usd"]

egress_mode offmodel_destination REMOTE_THIRD_PARTYclassification_tier INTERNALrows_in 11rows_out 0suppressions 0content_hash f6a22e6ae533adb1columns ["category","payments","volume_usd"]

egress_mode aggregatemodel_destination LOCALclassification_tier INTERNALrows_in 11rows_out 0suppressions 33content_hash e7eb4ea0eedb7987columns ["category","payments","volume_usd"]

egress_mode aggregatemodel_destination REMOTE_THIRD_PARTYclassification_tier INTERNALrows_in 11rows_out 0suppressions 33content_hash e7eb4ea0eedb7987columns ["category","payments","volume_usd"]

egress_mode sampledmodel_destination LOCALclassification_tier INTERNALrows_in 11rows_out 5suppressions 0content_hash ca17d53ba6ac0280columns ["category","payments","volume_usd"]

egress_mode fullmodel_destination LOCALclassification_tier INTERNALrows_in 11rows_out 11suppressions 0content_hash 7a50eb027fc5b234columns ["category","payments","volume_usd"]

egress_mode offmodel_destination LOCALclassification_tier CONFIDENTIALrows_in 10rows_out 0suppressions 0content_hash 14289ed7304a1f58columns ["customer_id","customer_state","high_risk_payments","email"]

egress_mode offmodel_destination REMOTE_THIRD_PARTYclassification_tier CONFIDENTIALrows_in 10rows_out 0suppressions 0content_hash 14289ed7304a1f58columns ["customer_id","customer_state","high_risk_payments","email"]

egress_mode aggregatemodel_destination LOCALclassification_tier CONFIDENTIALrows_in 10rows_out 0suppressions 20content_hash 7ee07faa71a4298ccolumns ["customer_id","customer_state","high_risk_payments","email"]

egress_mode sampledmodel_destination LOCALclassification_tier CONFIDENTIALrows_in 10rows_out 5suppressions 0content_hash d1eb98b6c9204e12columns ["customer_id","customer_state","high_risk_payments","email"]

egress_mode fullmodel_destination LOCALclassification_tier CONFIDENTIALrows_in 10rows_out 10suppressions 0content_hash 58337cbca0a45112columns ["customer_id","customer_state","high_risk_payments","email"]

The egress gate

classified
INTERNAL
at most
fullLOCAL
asked
off
gets
off

egress off

classified
INTERNAL
at most
aggregateREMOTE_THIRD_PARTY
asked
off
gets
off

egress off

classified
INTERNAL
at most
fullLOCAL
asked
aggregate
gets
aggregate

aggregate (governed counts only)

classified
INTERNAL
at most
aggregateREMOTE_THIRD_PARTY
asked
aggregate
gets
aggregate

aggregate (governed counts only)

classified
INTERNAL
at most
fullLOCAL
asked
sampled
gets
sampled

sampled (up to 5 rows)

classified
INTERNAL
at most
aggregateREMOTE_THIRD_PARTY
asked
sampled
gets
aggregate

aggregate (governed counts only) (capped from sampled)

classified
INTERNAL
at most
fullLOCAL
asked
full
gets
full

full result

classified
INTERNAL
at most
aggregateREMOTE_THIRD_PARTY
asked
full
gets
aggregate

aggregate (governed counts only) (capped from full)

classified
CONFIDENTIAL
at most
fullLOCAL
asked
off
gets
off

egress off

classified
CONFIDENTIAL
at most
offREMOTE_THIRD_PARTY
asked
off
gets
off

egress off

classified
CONFIDENTIAL
at most
fullLOCAL
asked
aggregate
gets
aggregate

aggregate (governed counts only)

classified
CONFIDENTIAL
at most
offREMOTE_THIRD_PARTY
asked
aggregate
gets
off

egress off (capped from aggregate)

classified
CONFIDENTIAL
at most
fullLOCAL
asked
sampled
gets
sampled

sampled (up to 5 rows)

classified
CONFIDENTIAL
at most
offREMOTE_THIRD_PARTY
asked
sampled
gets
off

egress off (capped from sampled)

classified
CONFIDENTIAL
at most
fullLOCAL
asked
full
gets
full

full result

classified
CONFIDENTIAL
at most
offREMOTE_THIRD_PARTY
asked
full
gets
off

egress off (capped from full)

The model, on your cluster

The model, at a third party

From the resultWhat the gate hands the model, verbatim

Result shape only (egress off): 11 rows; columns: category, payments, volume_usd. No values disclosed.
Aggregate (counts only; no raw rows):
- category: (all groups suppressed); 0 null (11 groups <5 suppressed)
- payments: (all groups suppressed); 0 null (11 groups <5 suppressed)
- volume_usd: (all groups suppressed); 0 null (11 groups <5 suppressed)
Total rows: 11.
Result sample (up to 5 rows) of 11 total:
<untrusted_data>
columns: category, payments, volume_usd
travel, 278972, 306639028
electronics, 356439, 178744646
atm, 733518, 131557225
e-commerce, 1023109, 129169185
grocery, 1613606, 116720438
</untrusted_data>
Result all rows of 11 total:
<untrusted_data>
columns: category, payments, volume_usd
travel, 278972, 306639028
electronics, 356439, 178744646
atm, 733518, 131557225
e-commerce, 1023109, 129169185
grocery, 1613606, 116720438
apparel, 650096, 92028769
utilities, 285352, 49873951
restaurants, 835538, 46296795
health, 578017, 36000151
fuel, 526612, 35624763
entertainment, 373140, 19727431
</untrusted_data>
Result shape only (egress off): 10 rows; columns: customer_id, customer_state, high_risk_payments, email. No values disclosed.
Aggregate (counts only; no raw rows):
- customer_id: (all groups suppressed); 0 null (10 groups <10 suppressed)
- customer_state: (all groups suppressed); 0 null (5 groups <10 suppressed)
- high_risk_payments: (all groups suppressed); 0 null (5 groups <10 suppressed)
- email: 10 distinct, 0 null (sensitive; values withheld)
Total rows: 10.
Result sample (up to 5 rows) of 10 total:
<untrusted_data>
columns: customer_id, customer_state, high_risk_payments, email
C00000001, California, 17, ***
C00000086, New York, 8, ***
C00000008, Texas, 7, ***
C00000043, Texas, 7, ***
C00000883, California, 7, ***
</untrusted_data>
Result all rows of 10 total:
<untrusted_data>
columns: customer_id, customer_state, high_risk_payments, email
C00000001, California, 17, ***
C00000086, New York, 8, ***
C00000008, Texas, 7, ***
C00000043, Texas, 7, ***
C00000883, California, 7, ***
C00000003, Colorado, 6, ***
C00000586, Florida, 6, ***
C00001526, Texas, 6, ***
C00000006, New York, 5, ***
C00000016, Colorado, 5, ***
</untrusted_data>

No values. With egress off the summary is not asked for, and an agent reads only this line.

Counts per column, groups under 5 rows hidden, sensitive columns as counts only.

The first 5 rows, any sensitive column masked.

Every row, any sensitive column masked.

Counts per column, groups under 10 rows hidden, sensitive columns as counts only.

AlwaysIn the prompt, at every level

The question
What did cardholders spend by merchant category in the last 30 days?
Names, types and descriptions from the semantic layer, among them
hms.bank_gold.daily_spend txn_date, customer_state, category, channel, payments, approved, volume_usd, avg_ticket_usd, decline_rate_pct, high_risk_payments
  • Certified metrics with their SQL, the glossary and curated value lists, as a curator published them
  • Up to five verified question and SQL pairs, and the chat’s earlier questions and SQL
The question
Which ten customers had the most high-risk payments, with email?
Names, types and descriptions from the semantic layer, among them
hms.bank_gold.customer_360 customer_id, customer_state, segment, payments_90d, spend_90d_usd, avg_ticket_usd, international_share_pct, last_payment_at, high_risk_payments, top_category
hms.bank_bronze.customers customer_id, first_name, last_name, ssn, birth_date, state, state_code, city, segment, kyc_status, phone, customer_since, email
  • Certified metrics with their SQL, the glossary and curated value lists, as a curator published them
  • Up to five verified question and SQL pairs, and the chat’s earlier questions and SQL

How that SQL runs on each engine, whose permissions it runs with, and where the column lineage the MCP server reads comes from: how SQL runs on DuckDB, Spark SQL and Trino, access control in Ilum and how data lineage works.

Ask Data: a question in, the SQL that ran out

Ask Data hands the model your question and the semantic layer, and the model writes SQL. The brain checks it with a dry run, runs it through the MCP server with your token, so ilum-core applies your permissions, and has the model correct it when the engine refuses it.

Ask Data

Answers are generated by a model. Every answer shows the SQL that ran, the rows sent to the model, and where the model ran.

Retrieving contextGenerating SQLValidatingExecutingSelf-correcting

0:00 / 0:19

Key moments

  1. Text to SQL in stages you can follow

    The model states its plan in plain words and calls the query tool, while the trail moves from Retrieving context to Generating SQL.

  2. The exact SQL, and the assumptions behind it

    Open it in the SQL editor or an Ilum notebook. Below it are the model’s assumptions, such as last month as 1 to 31 October.

  3. Figures computed from the result, not by the model

    The answer says where the model ran and how many rows it was sent. Ilum adds the figures it computed itself from the result.

  4. Every row of the result, with its count and timing

    Ten rows in four columns, with the row count, how long the query took and whether the result was truncated.

  5. A chart drawn in your browser, unseen by the model

    The console charts the rows itself. The model never saw this chart.

The trust rail: did any of my data leave?

Beside each answer the trust rail answers that question and records what the run did, not whether the answer is right. A person’s privacy level, Maximum, Balanced, Standard or Open, only narrows what the organization allows, and as shipped its egress mode is off. Governance audit keeps that record for every answer of every user, one ledger row per result that passed the gate.

Trust & governance

The rail records what the run did. It makes no claim that the answer is right.

EgressGroundingAssumptionsExecutionAccounting

My data privacy level

How much of your data the AI model may see, for your sessions.

MaximumBalancedStandardOpen

0:00 / 0:29

Key moments

  1. Where the result rows went, beside each answer

    The rail reads No: all 10 rows went to a local model. Then come the requested and effective mode, destination and classification.

  2. A cloud model and a stricter level, for one chat

    The menu keeps local and cloud models apart. The chat moves to a cloud model and to Balanced, stricter than the person’s own level.

  3. Sensitive columns are found by their names

    The next question asks for customers with their phone and email. Columns with those names make the result confidential.

  4. Confidential rows never reach a cloud model

    The gate blocks the result and says why. The model gets the row count and column names only, and the rail counts 0 of 20 rows sent.

  5. You still see every row, under your own permissions

    All 20 rows with phone and email are in your result table. The gate decides what the model reads, not what you see.

Follow-up questions, in the same chat

Ask Data keeps the conversation. A follow-up is read with the questions asked earlier in the chat and the SQL that answered them, never their rows, and the model is told to adapt that SQL rather than ask again.

Ask Data

AnalysisResultsVisualizationArtifacts

Grounding

Pinned at the start of the conversation and immutable, so every answer in this thread was produced against the same model.

0:00 / 0:20

Key moments

  1. A follow-up that names no table or month

    “How does that compare with the month before?” The model’s first step puts October next to September, from the same table.

  2. The definition of the answer before, kept

    Its assumptions: September against October as whole months, card spend as in the answer before, ATM withdrawals left out.

  3. Every answer shows its SQL, its rows and its model

    Spend rose in every category, and the answer again shows where the model ran, how many rows it was sent and its SQL.

  4. Both months and the change in one result

    The Results tab holds october_usd, september_usd and change_pct for each of the ten categories.

  5. The model’s chart, on a pinned semantic model

    The chart the model asked for is marked AI-generated. The footer names the semantic model pinned when the chat began, the same for every answer in it.

AI functions in SQL

Five functions call a model from a query: ai_complete, ai_classify, ai_extract, ai_summarize and ai_embed.

Spark SQL
ai_complete(prompt[, options])        -> string
ai_summarize(input[, options])        -> string
ai_classify(input, labels[, options]) -> string
ai_extract(input, fields[, options])  -> struct
ai_embed(input[, options])            -> array<float>

SELECT
  review_id,
  ai_classify(review_text, array('positive', 'neutral', 'negative')) AS sentiment
FROM reviews;
DuckDB
ai_complete(prompt)
ai_summarize(input)
ai_classify(input, labels)
ai_extract(input, fields)
ai_embed(input)              -- with an embedding model set
  • Spark SQL expressions and DuckDB macros

    On Spark SQL they are expressions of the engine, added by an Ilum extension, and on DuckDB macros over its flock extension. Trino does not have them yet.

  • Each call runs on the key of the person who runs the query

    Calls go through the AI gateway with that person’s own virtual key, within its rate limits. On Spark SQL the key is read only when the query runs, so it never shows in the plan or in EXPLAIN.

  • Typed results: a label, a struct, a vector

    On Spark SQL, ai_classify answers with exactly one of the labels you pass, ai_extract with a struct of one string per field you name and ai_embed with an array of floats. A null input gives a null.

An MCP server for your own agents

ilum-mcp gives an MCP client seven read-only tools over Streamable HTTP at /external/mcp/.

tools
list_catalogs    TABLEEXPLORER_READ
  the metastores (catalogs) registered in Ilum

list_tables      TABLEEXPLORER_READ
  the databases of a metastore, or the tables of one

get_schema       TABLEEXPLORER_READ
  one table: columns with types, nullability and comments

column_lineage   LINEAGEGRAPH_READ
  the fields each column derives from, up or downstream

explain_sql      SQL_READ
  the engine's plan for a statement, without running it

dry_plan         SQL_READ
  validates a statement, or returns a correctable error

execute_sql      SQL_EXECUTE
  runs one read-only statement as the caller
  • Every call runs as the user whose token it carries

    The client sends an Ilum token with each call and ilum-mcp holds no credentials, so ilum-core applies that user’s permissions, tool by tool.

  • Read-only SQL: a DROP gets INVALID_STATEMENT

    execute_sql takes one statement that starts with SELECT, EXPLAIN, SHOW, DESCRIBE or WITH. It returns at most 1,000 rows by default, never more than 10,000.

  • The same tools Ask Data runs its SQL through

    Ask Data checks each statement with dry_plan and runs it with execute_sql, with the token of the person asking.

Bring your own model

Every model sits behind the AI gateway, registered in the chart or in Settings under Model providers.

Model providers

Models registered with the AI gateway.

local (in-cluster)external (commercial API)

AI cost

The gateway spend report for the last 30 days.

values.yaml
ilum-ai-gateway:
  models:
    - name: <name>
      provider: <provider>
      model: <model id>
      apiBase: <endpoint>
      apiKeySecret:
        name: ilum-ai-provider-keys
        key: <key>
      location: external
  • Each model is marked local or external

    A model on your cluster is local, a commercial API external, and the chart refuses an entry without a location. Ask Data reads it to decide what of a result the model may see.

  • A virtual key per person, with rate limits and a budget

    Each person gets a virtual key of their own with rate limits and an optional budget. The AI cost screen shows the gateway’s spend for the last 30 days.

  • Provider keys are never stored in Ilum

    A provider’s API key comes from a Kubernetes Secret through the chart, or is typed into the form and passed on to the gateway.

Switch it on

Enterprise

The AI Assistant is part of Ilum Enterprise. Talk to an engineer to get it on your cluster.

Talk to an engineer

  1. Needs

    A model the gateway can reach, as under Your own models. AI_USE to ask, and SQL_EXECUTE for the queries it runs.

    Ask Data

  2. Needs

    Rows reach a model only after an administrator raises the default egress mode from off, in Settings under Egress governance or with ilum-ai-brain.egress.defaultMode. Classification reads the names of the result’s columns, never their values.

    Trust rail and privacy levels

  3. Needs

    The completion model named in ilum-core.aiGateway.functions.completionModel, a blank name turns the functions off. Spark SQL engines on Scala 2.13, and on DuckDB its flock extension.

    AI functions in SQL

  4. Needs

    An Ilum token in the Authorization header of each call, and the permissions of the tools it uses: TABLEEXPLORER_READ, LINEAGEGRAPH_READ, SQL_READ or SQL_EXECUTE.

    MCP server

  5. Needs

    A server for a model on your cluster, which the chart does not install. An external model needs its key, in a Kubernetes Secret through the chart or typed into the form, and an egress rule in ilum-ai-gateway.networkPolicy.extraEgress, since the gateway may only reach its own namespace by default.

    Your own models

Questions and answers

Does Ask Data send my data to a model?

Not the rows of a result, as shipped. The model gets your question, the semantic layer, what curators published (certified metrics, a glossary, curated value lists) and verified examples, and writes SQL that your cluster runs. Rows reach a model only through the egress gate, and only once an administrator raises the egress mode from off. With a model on your cluster the prompt and the result stay on it too.

How does Ilum decide that a column is sensitive?

By its name, never by its values. A column whose name contains one of 32 fragments, among them email, phone, ssn, birth_date, iban, salary and address, is CONFIDENTIAL and shows as *** in every row a model reads. The result may then go only to a model on your cluster, unless an administrator sets the override, and an answer that goes past the cap says so. Counts of such a result hide groups under ten rows.

What do the privacy levels Maximum, Balanced, Standard and Open do?

Maximum sends no values. Balanced sends counts per column and hides groups under five rows. Standard sends five rows and Open every row up to 200, sensitive columns masked in both. Whatever the level, a model at a third party gets at most counts, and nothing from a result with a sensitive column. Balanced and Maximum send nothing rather than less when a cap applies. Only an administrator’s override lifts the caps, and an answer that goes past one says so. As shipped, the organization’s egress mode is off and every level acts as Maximum.

What do curators give the model to trust?

Certified metrics as SQL expressions with the dimensions they may be grouped by, a glossary and curated value lists, published as a new immutable version that every answer pins, and verified question and SQL pairs, the closest of which guide each new question. With ilum-ai-brain.generation.engine=certified-first, a question that clearly matches a certified metric gets its SQL built from the metric, not written by the model. Curating, like reading Governance audit, needs the AI_CURATE permission.

Which SQL engines does the AI Assistant use?

Ask Data and the MCP server run SQL on DuckDB, Trino or Spark SQL through ilum-core, DuckDB by default in the console. The AI functions exist on Spark SQL and DuckDB.

Can the model run on my own cluster?

Yes. Register it with location local, in the chart or in Settings, and run its server on the cluster yourself. The gate treats such a model as LOCAL, the only place a result with a sensitive column may go, masked.

Is the AI Assistant part of the free Community edition?

No. The AI Assistant is a module of Ilum Enterprise. The rest of the console, Spark jobs, SQL, notebooks, lineage and the modules outside Enterprise, stays free in Community.

Contact

Tell us about your cluster.

Name one workload you want to move.

Tell us where it runs today.

We answer with a plan, not a deck.

[email protected]

We reply within two working days.