Skip to main content
SEMANTIC LAYER FOR AI

Business semantics do not belong
inside a prompt

Metrics, dimensions, business terms and join semantics become a reviewable, versioned model —
so business users can ask in plain language while agents, reports and APIs share one definition

Governed semantic layer
Deterministic S2SQL compilation
Read-only execution guard
Zero silent wrong answers

Getting a model to write runnable SQL stopped being hard

Getting it to mean the same thing every time is the hard part

The usual approach stuffs schema, column comments and a few SQL examples into a prompt and lets the model emit physical SQL. It validates quickly, then drifts as the business grows.

Definitions scattered everywhere

One "revenue" can live in three prompts across three agents, and they drift apart fast.

Join paths re-guessed each time

The same orders table can be joined differently per question, quietly doubling amounts.

Schema changes shift results

A single new column can silently change what a production query covers.

Fixes do not transfer

A new few-shot example usually fixes one phrasing. Reword it, or swap models, and it returns.

The dangerous failure is not "no answer". Refusals and clarifications are visible to the user; a plausible-looking wrong number is not.

The LLM reads intent; the compiler decides execution

Every query passes five stages. If any step cannot prove safety, it never reaches the database.

  1. 01MapperPhrase mapping

    Maps natural language onto published business names via the dictionary and semantic index

  2. 02ParserS2SQL generation

    Emits business names only — no physical tables, columns or join clauses

  3. 03CorrectorGovernance checks

    Verifies members, filter values, aggregation and that every confirmation was honoured

  4. 04TranslatorDeterministic compile

    Binds frozen safe join paths and compiles parameterised physical SQL

  5. 05GuardExecution boundary

    Read-only AST allowlist, row cap and timeout, executed in a read-only transaction

The model proposes, the compiler decides — verifying is easier than choosing. Swapping the chat model never changes a metric definition.

Six core capabilities

From semantic modelling and release governance to querying, diagnostics and feedback loops

01

One governed semantic catalog

Business definitions are model data, not prompt attachments

The catalog holds Model, Relation, Metric, Dimension, Term and DimensionValue. Names, aliases, formulas, default aggregations, additivity, time axes and real dimension values are all governed resources.

Atomic and derived metricsFormula, default aggregation, display format and semi-additive constraints
Metric time axisEach metric declares the time column used for filters and period comparisons
Business dictionary"Revenue", "turnover" and "GMV" resolve to the same governed metric
Real value dictionarySampled low-cardinality values so "East China" is recognised correctly
One release serves the ask page, agents, structured APIs and regression suites alike
02

AI drafts, humans publish

AI speeds modelling up, but output is always a reviewable draft

AI proposes entity names, field roles, metric and dimension drafts and aliases. Every suggestion lands in a Candidate Revision; anything overwriting human work is unchecked by default.

Entity and field namingTurns physical names like t_ord_mst into readable business entities
Relationship canvasHumans confirm relationships and join cardinality to prevent fan-out
Structural validationChecks metric references, dimension bindings, path validity and time axes
Real-data quality reportRead-only queries verify key uniqueness, cardinality, fan-out and reachability
Passing structural validation does not mean the model is right — only real data exposes fan-out
03

Deterministic S2SQL compilation

The LLM never writes the final SQL

Scope is not picked by a router up front. The model writes business-name S2SQL and the compiler tries each real scope: exactly one success binds it, zero means the question crossed fact roots, several converge to the coarsest grain.

Frozen join pathsSafe paths from each fact root are frozen at publish time, never inferred live
Parameterised SQLPhysical SQL is always parameterised — never string concatenation
Advanced query shapesSet operations, period comparisons, rolling ratios, share-of-group, top-N per group
Fail closedIf members, paths or versions cannot be proven safe, the query is refused
With rules in a deterministic compiler, agents never need to know a physical table name
04

An answer surface built for business users

The system states how it read your question instead of deciding silently

Colleagues ask in plain language, stages stream as they complete, and the answer card shows the assumptions the system filled in. Follow-up questions and drill-downs continue from there.

Interpretation chipsInferences like reading "sales" as sales amount are stated explicitly
Visible, revocable time windowA default window is shown on the answer and can be cleared in one click
Deterministic drill-downEdits filters, dimensions, metrics or windows — or refuses rather than degrading silently
Pin to reportsGood answers become cards, archived per project, refreshable and exportable to Excel
What a business user confirms should always be meaning, never an internal execution plan
05

Fixed-stage diagnostics

An ask-your-data system you can test and debug like normal software

Every query produces a fixed-stage timeline showing whether the failure happened in mapping, parsing, correction, translation or execution, exportable as redacted Markdown.

Stage timelineReal timings per stage turn triage from guesswork into location
Model call detailsPurpose, attempts, latency and prompt size for every model and vector call
Redacted exportPasswords, API keys, connection credentials and tokens are stripped automatically
Golden SuiteBuild regression sets from real questions to catch regressions before publishing
The same "it cannot answer" means add dictionary entries in Mapper, or fix the model in Translator
06

Vocabulary gaps flow back into the model

Phrases the system could not catch are not simply lost

Refusals, clarifications, model guesses, unknown values and thumbs up or down all land in one inbox, aggregated by phrase and fed back into modelling.

Six signal typesRefusal, clarification, model guess, unknown value, upvote, downvote
Aggregated by phraseGrouped by the actual wording and counted, so frequent gaps get fixed first
One-click dictionary entryPublish the fix once and it applies to every entry point
Version-bound recordsFailures and quality reports bind to the same revision and release
A dictionary entry is reviewable, publishable and applies to everyone; a memory is none of those

Capability matrix

Data sources, modelling, compilation, governance, diagnostics and self-hosting

Data sources

PostgreSQLMySQLExcel uploadMulti-sourcePer-project binding

Modelling

Schema snapshotDrift detectionRelationship canvasCardinality reviewSQL Model

AI assistance

Entity namingRole classificationMetric draftsAlias suggestionsValue dictionary

Compilation

S2SQLFrozen pathsParameterised SQLRead-only guardGrain convergence

Advanced queries

Set operationsPeriod comparisonRolling ratiosShare of groupTop-N per group

Version control

RevisionETagImmutable releaseSemantic index bindingRollback

Quality

Dual playgroundsGolden SuiteData quality reportStage diagnosticsRedacted export

Deployment

Docker ComposeStandalone web UIOpenAI-compatible endpointsSelf-hosted modelsOffline install

A semantic layer, not a longer prompt

Where the two approaches diverge on the same natural-language question

ConcernKnowFlow AnalyticsDirect Text-to-SQL
Business definitionsMetrics, dimensions, terms and value dictionaries live in a versioned catalogWritten into prompts, doc snippets or few-shot examples
Joins and grainCardinality confirmed by humans; safe paths and fact roots frozen at publishInferred by the model from schema, per question
SQL generationLLM emits business-name S2SQL; the compiler produces parameterised SQLThe LLM emits physical SQL directly
AmbiguityBusiness candidates are shown for confirmation, and the choice must be usedEdit the prompt, add examples, or silently pick one
ReuseOne release serves agents, UI, APIs, evaluation and data appsUsually bound to a single agent or entry point
Change controlCandidate revision, review, validation, publish, rollbackEditing a prompt can shift behaviour everywhere
Failure policyFails closed when members, paths, aggregation or version cannot be provenSyntactically valid SQL may simply run

Accuracy is more than "how many returned a result"

Runs the same authenticated API a browser uses: import, model, publish, load held-out questions, ask, then compare row by row against reference SQL

DatasetCorrectAccuracySilent wrong answers
E-commerce12 / 12100%0
Cities & libraries11 / 1291.7%0
Music (holdout)9 / 1275%0
Total32 / 3688.9%0

This is a controlled experiment on specific datasets, not a general Text-to-SQL benchmark result. We publish it to show the evaluation runs the full path a user actually experiences, rather than feeding curated semantics straight into components.

Open source and commercial

Both run the same semantic model on the same query engine

CapabilityOpen sourceCommercial
Modelling workbench (sources, modelling, validation, feedback)
AI-assisted modelling, alias and value dictionary suggestions
Publishing, rollback and pre-publish quality reports
S2SQL compilation, governance gates, read-only guard, query API
PostgreSQL / MySQL / uploaded tables, multiple sources
Vocabulary gap inbox, Golden Suite, diagnostics export
Ask assistant: conversational questions, follow-ups, drill-down
Reports: pinned cards, per-project archive, refresh, Excel export
Project authorisation and data scope: multi-user RBAC, row/column rules
Integration with the knowledge base, agents and enterprise accounts
Enterprise accounts, LDAP / OIDC, WeCom sign-in

Where teams use it

From business self-service to agents and embedded data apps

Business self-service

Colleagues ask about operating data in plain language without writing SQL or waiting on a queue, and can drill down from the answer.

Plain languageVisible reasoningDeterministic drill-down

Data tooling for AI agents

Agents fetch business definitions through the resource API and issue governed queries without assembling tables, columns or joins.

Resource APIGoverned queriesConsistent metrics

Operating reports and reviews

Stable answers become report cards archived per project, refreshed on demand and exported to Excel as a full page.

Report cardsRefresh on demandExcel export

Embedded data applications

Product teams use Analytics as a standalone query backend, reusing one set of metric definitions and permission boundaries.

Structured queriesOne definitionPermission boundary

Validate it against your own database

Bring your real schema, your metric definitions and your typical questions, and run one full modelling-to-answer cycle with us