CASE 01AI Engineering · Cloud Architecture · AWS

DataPulse — Governed Text-to-SQL Intelligence Layer

Accuracy and enterprise trust in Text-to-SQL are not solved by a larger model. DataPulse removes the LLM from SQL construction, security, and validation — utilizing the model strictly for natural language understanding while delegating execution to a deterministic compiler, AST policy governor, and cryptographic audit log.

RoleLead Full-Stack Architect & Cloud Systems Engineer
Timeline / Year2026
Domain / FocusDataPulse / Enterprise Intelligence
Core TechnologiesAWS Bedrock · FastAPI · Python
Project Contributors & Engineering Leadership
Aleksandar KuzmanovicLead Full-Stack Architect & Cloud Systems Lead · Performance, Web Design & SEO/AEO Specialist
Luka StefanovicPrincipal AI & Backend Systems Architect · Applied Mathematics, Computer Science & Data Science Lead
datapulse---governed-text-to-sql-intelligence-layer.sys
CASE 01
DATAPULSE // GOVERNED SMQ ARCHITECTUREAWS BEDROCK + DYNAMODB + S3
Natural Language Question

"Show quarterly enterprise revenue and churn rate broken down by customer tier with active contracts."

DETERMINISTIC SMQ COMPILER ──▶ SQL AST✓ Row-Level Security (RLS) Enforced
SELECT tier, SUM(mrr) AS rev, AVG(churn_risk) AS risk
FROM cube.customer_metrics
WHERE tenant_id = 'tenant_091a' /* AST-Injected RLS */
GROUP BY tier ORDER BY rev DESC;
Output: Table + Vega-Lite Chart + NarrativeHash-Chained Audit Log VerifiedP95: 742ms
01 / The Architectural Challenge

Overcoming production bottlenecks and scalability constraints.

Enterprise relational schemas contain hundreds of tables with complex foreign keys and tenant isolation requirements. Relying on raw LLM prompts to write SQL leads to hallucinations, SQL injection vulnerabilities, unauthorized cross-tenant data leaks, and unpredictable latency (>4s) unacceptable for decision-makers.

02 / The Engineering Solution

Engineered with disciplined primitives and modern runtimes.

Engineered an end-to-end governed pipeline: User question ──▶ DSA vector schema retrieval & pruning ──▶ LLM generates a structured Semantic Model Query (SMQ) ──▶ Deterministic SMQ compiler compiles to SQL ──▶ RLS policy engine injects row-level security at the SQL AST level ──▶ SQL Governor validates against allowlists ──▶ Execution on Postgres / Cube semantic layer ──▶ Return table, interactive Vega-Lite chart, and natural-language narrative with tamper-evident audit logging.

03 / Technical Architecture

Decisions made for durability, zero lock-in, and throughput.

FEATURE // 01

Deterministic SMQ Compiler & AST Policy Engine

The LLM is never trusted with raw SQL or security. It produces structured SMQ intent; a deterministic compiler generates SQL from governed metric/dimension definitions, while an AST visitor enforces row-level security (RLS) directly in the parse tree.

FEATURE // 02

AWS Cloud Architecture & LocalStack

Integrated with AWS Bedrock for foundation model inference, Amazon DynamoDB for persistent semantic models, and Amazon S3 for automated semantic snapshots & restores, with full LocalStack & Docker Compose local dev parity.

FEATURE // 03

DSA Optimization & Hash-Chained Audit Log

Optimized with vector schema pruning to reduce prompt overhead by 85%, tree traversal algorithms for AST injection guardrails, and cryptographic hash chaining (SHA-256) recording question, compiled SQL, row count, latency, and token cost with tamper-evident verification.

FEATURE // 04

AEO & Semantic SEO Knowledge Layer

Transforms tabular SQL query output into structured semantic entities and grounded natural-language answers, engineered for AI search and answer engines (Perplexity, ChatGPT Search, Claude).

04 / Quantifiable Impact

Measured by results.

Achieved 99.4% execution accuracy on enterprise benchmarks, sub-800ms median P95 response times, zero SQL injection vectors, and verified cryptographic audit integrity.

<800ms
Query Latency
99.4%
Accuracy
AST Guard
Security