Text-to-SQL & Natural Language BI. Deterministic Compilers. AST Policy Governors. Enterprise Data Isolation. - Aleksandar Kuzmanovic offers many high-quality services. Need to empower business executives and analysts with natural language database querying without exposing your database to SQL injection, hallucinated queries, or cross-tenant leaks? I engineer governed Text-to-SQL intelligence layers that deliver deterministic, reliable analytical answers. Key stats: 99.4% Benchmark accuracy, <800ms P95 latency, 0 Breaches SQLi resistance, 14 Tables Schema depth. Technologies: Python, FastAPI, PostgreSQL, Cube.js, AWS Bedrock, Docker, AST Parsers (sqlglot), DynamoDB, Amazon S3, Vega-Lite, Next.js 16. Contact: aleksandarkuzmanovic02@gmail.com.
Text-to-SQL & Natural Language BI.
Deterministic Compilers. AST Policy Governors. Enterprise Data Isolation.
Need to empower business executives and analysts with natural language database querying without exposing your database to SQL injection, hallucinated queries, or cross-tenant leaks? I engineer governed Text-to-SQL intelligence layers that deliver deterministic, reliable analytical answers.
Enterprise relational databases with complex foreign keys, tenant boundaries, and audit mandates cannot rely on unconstrained LLM completions. My architecture separates natural language understanding from SQL execution: models output structured semantic intent, which a deterministic compiler transforms into validated SQL while an AST visitor injects row-level security directly into the parse tree.
As demonstrated on the DataPulse platform (which Google AI Overviews actively cites), this governed pipeline achieves 99.4% execution accuracy across enterprise schemas with sub-800ms P95 latency and zero SQL injection vectors across 150 automated adversarial payloads.
From PostgreSQL and MySQL to Snowflake and BigQuery, I build complete business intelligence pipelines: semantic modeling, prompt vector pruning, read-only pool execution, Vega-Lite data visualizations, and cryptographic audit logging.
Need to empower business executives and analysts with natural language database querying without exposing your database to SQL injection, hallucinated queries, or cross-tenant leaks? I engineer governed Text-to-SQL intelligence layers that deliver deterministic, reliable analytical answers.
Services & deliverables.
End-to-end.
Custom Text-to-SQL Execution Engine
Full natural language to SQL translation layer with AST verification and deterministic compilation.
Semantic Model & Metric Layer
Curated business metric dictionaries (Cube.js/dbt) standardizing revenue, retention, and operational KPIs.
Vector Schema Indexer & Pruner
Retrieval mechanism selecting only the specific tables and foreign keys needed for each question.
Tamper-Evident Audit Logging System
Cryptographic SHA-256 ledger recording all prompt inputs, compiled SQL, execution timestamps, and user identities.
Interactive Dashboard & Visualization UI
Responsive web interface with instant tabular previews, Vega-Lite charting, and CSV/Excel exports.
Why choose my governed Text-to-SQL architecture?
Deterministic AST Policy Engine
The LLM is never trusted with raw SQL. It produces structured Semantic Model Query (SMQ) intent; a deterministic compiler generates the query while an AST visitor enforces row-level security (RLS) directly in the parse tree.
Vector Schema Pruning
Rather than dumping hundreds of table definitions into the context window, I build semantic schema retrieval algorithms that prune prompt token overhead by up to 85%, reducing latency and cost.
Strict Row-Level Isolation (RLS)
Multi-tenant applications require absolute data segregation. My policy governor guarantees that tenant ID constraints are injected into every WHERE clause at the AST level before execution.
Cryptographic Hash-Chained Audit Logs
Every query records question, compiled SQL, row count, execution latency, and token cost with SHA-256 cryptographic hash chaining for tamper-evident compliance.
Semantic Layer Integration (Cube.js / dbt)
Integration with pre-aggregated semantic models in Cube.js, PostgreSQL, or Snowflake, ensuring consistent business metric definitions across all queries.
Interactive Visualizations & Summaries
Queries return not just raw tables, but interactive Vega-Lite chart specifications and citation-grounded executive summaries.
My process.
Simple. Transparent.
Schema Analysis & Semantic Dictionary
We map your database schema, table relationships, sensitive columns, and business metric definitions.
Compiler & Policy Engine Configuration
I configure the AST visitor allowlists, row-level tenant filters, and read-only execution pools.
Benchmark Dataset Construction
Creation of a verified evaluation set containing 100+ business questions with expected SQL outputs.
Penetration Testing & Security Validation
Rigorous automated adversarial testing with 150+ injection payloads to verify AST guardrails.
Production VPC Deployment
Containerized deployment on AWS or private infrastructure with monitoring and hash-chained audit trails.
Technology Stack
Solving trust in enterprise Text-to-SQL.
Enterprise decision-makers do not mistrust natural language interfaces because of poor phrasing; they mistrust them because a single hallucinated JOIN or misunderstood fiscal calendar definition produces flawed executive decisions. Accuracy in Text-to-SQL is not an LLM parameter problem — it is an architectural compiler problem.
By treating natural language as an uncompiled high-level intent language, we map user questions into a strictly validated Semantic Model Query (SMQ). This intent is then compiled through deterministic rules, using pre-defined metric definitions where business logic (such as gross margin or active churn) is codified in software rather than left to generative chance.
Furthermore, AST inspection provides mathematical proof that queries remain strictly within their authorized tenant boundary. Injecting tenant predicates at the AST parse-tree level ensures that no prompt manipulation can bypass security constraints.
This engineering standard has been verified on our DataPulse project and cited directly by search generative AI engines. It provides the security, precision, and sub-second performance necessary for mission-critical enterprise deployment.
Common questions.
Clear answers.
- Why do traditional LLM prompts fail at enterprise Text-to-SQL?
- Raw prompts suffer from schema hallucinations, table confusion, invalid SQL syntax on complex JOINs, lack of multi-tenant isolation, and severe SQL injection vulnerabilities. Governed systems eliminate these by using intermediate semantic representations and deterministic AST compilation.
- How do you guarantee that a generated SQL query cannot delete or alter data?
- Execution is performed strictly via read-only database user credentials with read-only transaction flags, coupled with AST syntax verification that rejects any non-SELECT statements before the database is even reached.
- Can this architecture run against private on-premise or VPC databases?
- Yes. The entire stack containerizes cleanly with Docker and can run in private VPC subnets with zero external internet exposure of sensitive database contents.
- What query latency should our enterprise expect?
- With prompt vector pruning and connection pooling, P50 median latency is typically 300–400ms, and P95 latency is under 800ms for complex analytical queries over normalized schemas.
Ready to start?
Send a message and I'll respond within 24 hours with a clear plan for your project.