Principal Applied AI & Analytics Engineering Reference

Enterprise Hybrid Data Copilot — Decision-Support Review Console

Inspectable Python/FastAPI and TypeScript reference system bridging structured relational KPIs (SQLite) and unstructured operational SOPs with pre-query data-freshness gates, AST-validated read-only semantic SQL templates, deterministic numerical grounding verification, and SHA-256 digest-bound HITL workflow approvals.

Mode: Verifying Console... Warehouse: 4 Relational KPI Tables SOP Corpus: 8 Docs / 16 Passages Benchmark: 40 Decision-Support Queries Numerical Parity Rate: 1.0000 GitHub Repository
SQL Execution Accuracy
1.0000
+0.2941 vs Prompt-to-SQL | +1.0000 vs Text RAG
Numerical Parity Rate
1.0000
+0.4900 vs Prompt-to-SQL (0.5100)
Freshness Gate Precision
1.0000
6/6 Stale Partition Queries Blocked
Token Cost Efficiency
-83.24%
310 vs 1,850 tokens/query ($0.775 vs $4.625/1k)

Build-vs-Adopt 40-Query Evaluation Harness (artifacts/copilot_benchmark.json)

Evaluated across 14 relational SQL KPI queries, 10 unstructured SOP policy queries, 10 multi-source SQL+RAG compliance synthesis queries, and 6 stale-partition data-freshness gate queries.

Architecture SQL Exec Accuracy Numerical Parity Rate Freshness Gate Precision Routing Accuracy Mean Latency (ms) Est. Tokens / Query Est. Cost / 1k Queries

Build-vs-Adopt Executive Recommendation & Cryptographic Provenance

Interactive Semantic SQL + Unstructured SOP Router & Numerical Verifier

Select an operational or financial stakeholder question below to inspect its pre-query freshness check, AST-validated read-only SQL execution plan, retrieved SOP passages, and token-by-token numerical parity verification.

Relational Data Warehouse Freshness & Contract Gate (DQA-FRESH-24H / DQA-NULL-5PCT)

Before executing any SQL query or hybrid synthesis, src/copilot/data_quality.py inspects every table's schema columns, row-count bounds, column null ratios, and refresh timestamp age. Switch evaluation clock to observe partition blocking.

Digest-Bound Human-in-the-Loop (HITL) Approval State Machine (HITL-STATE-4 / HITL-DRIFT-SHA)

Step through the transactional SQLite state machine (DRAFT -> PENDING_APPROVAL -> APPROVED / REJECTED) bound to SHA256(normalized_question || sql_snapshot_sha256 || sorted_passage_sha256s || answer_sha256), and simulate an upstream SQL table refresh that automatically invalidates a prior approval.