OctaSQL Enterprise
AST-Validated Read-Only SQL
Air-Gapped / On-Premise Ready

Overcome the Text-to-SQL Crisis. Deterministic Deductive Intelligence for Enterprise Data Warehouses

Autonomous semantic analytics engine with single-pass profiling, AST security sandbox, multi-layer context fabric (up to 95% smaller prompts on our benchmark schemas), and native support for 8 DBMS. Generated SQL is AST-validated and runs read-only.

Watch Live Demo
Read-only
Every query is AST-validated and runs in a read-only session
Up to -95%
Smaller LLM prompt: roughly 100K → 5K characters on a schema of 70+ tables; 64–95% across four benchmark schemas
DuckDB
Exact state cells: drill-downs and what-if run locally without re-scanning the warehouse
8 DBMS
Postgres, ClickHouse, Greenplum, Snowflake, BigQuery, DuckDB...

NATIVE SUPPORT FOR HETEROGENEOUS ANALYTICAL AND TRANSACTIONAL DATABASES

PostgreSQL
ClickHouse
Greenplum MPP
Snowflake
Google BigQuery
DuckDB / Parquet
MySQL / MariaDB
MS SQL Server

BEYOND THE GENERIC AI BOTTLENECK

Why Generic Text-to-SQL (LangChain / LlamaIndex) Fails in Enterprise

Feeding raw DDL schemas directly into LLM prompts without a deterministic semantic layer leads to catastrophic data inaccuracies and security risks.

Generic Text-to-SQL

Black Box with Hallucinations

Result: unreliable answers and C-Level reluctance to trust AI insights.

OctaSQL Enterprise

Deterministic Deductive Engine

Every query is AST-validated before execution

Feature Matrix: Generic Text-to-SQL vs OctaSQL Platform

How different classes of analytical requests are handled by standard LLM libraries vs OctaSQL Enterprise

Query Class / Business Problem Generic Text-to-SQL (LangChain / Generic AI) OctaSQL Enterprise Platform
Token & LLM Context Efficiency:
LLM inference cost reduction
Full schema in every prompt
Forced to dump hundreds of table DDLs into every prompt. Massive API bills and 'Lost in the Middle' errors.
64–95% smaller prompt (roughly 100K → 5K characters on a schema of 70+ tables)
Proprietary Context Fabric extracts only the surgical relevant subgraph of the schema, reducing LLM prompt size and inference cost.
Diagnostic Root-Cause Analysis:
“Why did revenue drop 14% in Q3?”
Not Supported
Outputs only a flat number. Unable to identify hidden root causes or multi-table drivers.
Segment Contribution Analysis
Automatically isolates diverging segments and breaks the total change down into the exact contribution of each segment (region, category, channel).
Complex Multi-Table Ad-Hoc Joins:
10+ tables, nested CTEs, groupings
High risk of join errors
Erroneously joins tables on similar column names, creating massive cartesian product errors.
Foreign-Key-Aware Retrieval
Retrieval follows declared foreign keys, and planned mode builds joins only from them, which avoids joins on look-alike column names.
Segment What-If Simulations:
“What would revenue be if this segment had stayed at its baseline?”
Not Applicable
Generic Text-to-SQL can only query historical data 'as is' without scenario modeling.
Built-in Simulation Engine
Simulates an intervention on one segment (fixed value, multiplier, or baseline replacement) in an isolated sandbox; all other segments stay as observed.
Security & Database Integrity:
Prompt injections, DROP/UPDATE attempts
Data Corruption Threat
Generating queries directly from prompts is vulnerable to prompt injections and accidental destructive execution.
Multi-Layer Security Perimeter
AST validation rejects modifying statements before dispatch, and queries run in a read-only session.
Data Privacy & Compliance:
Banking secrecy, GDPR, HIPAA, PII
Schema & Data Leakage
Schemas and row samples are transmitted to public cloud LLM APIs without localization guarantees.
On-Premise / Air-Gapped Ready
Runs inside your corporate perimeter. With a local LLM, no schema, sample values or rows leave it.

INTERACTIVE SANDBOX

Experience OctaSQL in Action

Select a business scenario to see how OctaSQL formulates hypotheses, validates queries in the AST sandbox, and produces a segment contribution report.

Illustrative simulation: the scenarios, tables and figures below are sample data, not output of a live run.

AST Guardrails ON DuckDB Fabric
Every generated query is validated by the AST parser before execution.

HEXAGONAL ARCHITECTURE

4 Steps of Deterministic Analysis

How OctaSQL separates responsibilities between statistical scanning, local state fabric, and deductive planning.

01

Single-Pass Introspection

Autonomous DBMS system catalog scan. Calculates cardinality, null rates, quantiles and top values in a single batch query per table.

Single Batch Query per Table
02

DuckDB State Fabric

Local columnar semantic index + BM25 domain synonym registry for fast, local entity resolution.

Okapi BM25 Matching
03

AST SQL Sandbox

LLM proposes deductive hypotheses, while the AST validator strictly enforces Read-Only safety rules prior to query dispatch.

Strict Read-Only Sandbox
04

Segment Contribution Analysis

Decomposition of a metric change by segment of a dimension: the exact contribution of each segment (region, category, channel) to the net change.

Segment Contribution Engine

MEASURED RESULTS · OCTASQL 0.4.0

Accuracy and Prompt Size on Four Schemas

Over 130 questions on a large enterprise schema (70+ tables, questions in English and in Russian), the Pagila DVD-rental database and the Northwind retail database. A query counts as correct when it returns the same rows as a reference query written by hand.

Schema Full schema in prompt OctaSQL semantic OctaSQL planned Prompt, characters (full schema → OctaSQL)
Large enterprise schema, 70+ tables (English questions) 75.0% 98.6% 91.7% ≈105K → ≈4.8K (-95%)
Large enterprise schema, 70+ tables (Russian questions) 72.2% 94.4% 83.3% ≈100K → ≈4.7K (-95%)
Pagila DVD rental 93.3% 93.3% 100.0% ≈6.7K → ≈1.3K (-80%)
Northwind retail 86.7% 86.7% 90.0% ≈11.7K → ≈4.2K (-64%)

Semantic: the LLM writes SQL from the retrieved context. Planned: the LLM returns a typed plan and OctaSQL compiles the SQL.

Reading the table: on the large enterprise schema the retrieved context is both cheaper and more accurate than putting the whole schema in the prompt (94–99% against 72–75%). On small schemas the full schema fits and accuracy is equal; the gain there is a 64–80% smaller prompt. Planned mode builds SQL from a typed plan: it reached 100% on Pagila and is weakest on Russian-language questions over the large schema.

How it was measured: our own question sets, each question run twice, one open-weights LLM served locally. Results move between runs, by up to 3 points for semantic mode and up to 10 for planned mode, and will differ on your schema, questions and model. Prompt sizes are in characters, not tokens.

STANDARDIZED AI INTEGRATION

Native Model Context Protocol (MCP) Server

Connect OctaSQL directly to Claude Desktop, Cursor IDE, and custom enterprise AI agents via open JSON-RPC 2.0 protocol with zero glue-code.

Tools: query, observe_metric, drilldown_metric, observe_graph, simulate_what_if, deduce, get_catalog_snapshot, list_states
Resources: semantic://states, semantic://catalog
Prompts: deductive_analysis, what_if_scenario
claude_desktop_config.json JSON-RPC 2.0
{
  "mcpServers": {
    "octasql": {
      "command": "docker",
      "args": [
        "exec", "-i", 
        "octasql-prod", 
        "octasql", "mcp"
      ],
      "env": {
        "OCTASQL_LICENSE_KEY": "<your-license-key>"
      }
    }
  }
}

ENTERPRISE SECURITY

Uncompromising Data Perimeter Security

Designed for banking, retail, and healthcare institutions with strict security and isolation requirements.

Air-Gapped Isolation

Fully autonomous offline operation. Native support for local LLMs via vLLM / Ollama (Llama-3, Qwen-2.5, DeepSeek). With a local model, your data stays inside your own perimeter.

Runs fully on-premise

Cryptographic Licensing

Offline Ed25519 signature verification; a license can be locked to a node fingerprint (machine-id & MAC). The release image carries the vendor public key and ignores any override from the environment.

Zero-Network Verification

IP Protection & Hardened Core

The release image ships the engine compiled to a native module (Nuitka) with no Python sources, which raises the bar for casual reverse engineering.

Native Compiled Release
ENGINEERING ROADMAP

Upcoming Enterprise Modules

Key architectural enhancements in active development for upcoming enterprise releases.

IN ACTIVE DEVELOPMENT Compliance Priority

1. In-Flight PII Masking & Tokenization Vault

Automated scanning and cryptographic tokenization of sensitive personal data (passports, phones, cards, emails) before LLM ingestion. Zero raw PII in prompts (152-FZ / GDPR / HIPAA).

Architecture Specification Completed
PLANNED MODULE Enterprise Security

2. Granular RBAC & Row-Level Security (RLS)

Enterprise SSO integration (Active Directory, Keycloak, SAML 2.0) with AST-enforced policy injection. Automatically isolates organizational data slices by user role.

AST Policy Engine Specification Ready
PLANNED MODULE SIEM & Security Audit

3. Tamper-Proof Merkle Audit Trail (SIEM Integration)

Cryptographic Merkle-tree query signing with immutable event logs and streaming JSON telemetry into enterprise SIEM systems (Splunk, ELK, QRadar, KUMA).

Streaming Audit Telemetry Specification
PARTLY SHIPPED IN 0.4.0 LLM Cost Optimization

4. Semantic Vector Query Cache

Shipped in 0.4.0: a plan cache in the local DuckDB catalog. A repeated question is answered from the stored plan with no LLM call (0–145 prompt characters in our benchmarks), and with an embedding endpoint a paraphrase finds the same plan. Planned: Redis/Qdrant backends and a cache shared across nodes.

Plan cache shipped · shared backends planned

TOKEN & INFRASTRUCTURE ROI

LLM Token & API Cost Calculator

Estimate your annual savings on LLM API tokens by sending a compact retrieved context instead of the full schema.

Monthly AI / Analytics Queries: 5,000 queries/mo
Tables in DWH Schema: 100 tables
Target LLM Model:
Estimated Annual Savings on LLM API
$12,500
Tokens Saved / Year:
3.5B tokens

Illustrative estimate. Assumes ~450 tokens per table in a full-schema prompt vs ~1,200 tokens of retrieved context (measured on a schema of 70+ tables: roughly 1,400 characters per table in a full-schema prompt, 4–5 thousand characters of retrieved context). Actual results depend on your schema, model and questions.

ON-PREMISE LICENSING

Transparent Enterprise Plans

All licenses include the full deductive analytics engine, AST sandbox, MCP server, and protected binary distribution.

PILOT PROJECT

Developer / PoC

For testing hypotheses and validating architecture on 1-2 data warehouses.

Commercial Pilot License
  • 1 Enterprise Node (Node-Locked)
  • Up to 2 DBMS (Postgres, ClickHouse)
  • Deductive Analysis Module
  • MCP Server (Claude / Cursor)
MOST POPULAR
CORPORATE STANDARD

Enterprise On-Prem

For production deployments inside closed enterprise security perimeters.

Custom / license
  • Multi-Node Deployments (Node-Locked Keys)
  • All 8 DBMS (including GP, Snowflake, BQ)
  • Segment Contribution Analysis & What-If
  • Air-Gapped Operation with Local LLMs
  • Helm Chart for Kubernetes
  • 8x5 / 24x7 Dedicated SLA Support
FOR VENDORS & INTEGRATORS

OEM / White-Label

Embedding the deductive engine into your own B2B platforms and applications.

Partnership / custom
  • Full White-Label Rebranding
  • Custom Connectors to Legacy DWH
  • Dedicated Solutions Architect
  • Joint Product Roadmap Alignment

Ready to Test OctaSQL on Your Data?

Request a pilot license and a test On-Premise key for a working distribution.