How bhagyesh-074/semantiq works
SemantiQ is a governed text-to-SQL product: users ask warehouse questions, the agent resolves business terms, gates ambiguity, generates SQL through either governed semantics or schema-only fallback, then executes and validates it with bounded self-correction. Data owners can compile and review the semantic catalog; the React interface presents answers, citations, clarification prompts, failures, and retry traces. The README documents the main agent stages; source excerpts show API dispatch and UI submission. Some internal wiring and UI component behavior is supported only by the README or SOURCE INDEX, so unverified links are omitted.
Main entry points: App.jsx Question App · executor.py Pipeline Executor · sql_generation.py SQL Generation · compiler.py Layer Compiler
Components 20
Question Interface
- Question App
frontend/src/App.jsx - Question Input
frontend/src/components/QuestionInput.jsx - Resolved Terms
frontend/src/components/ResolvedTerms.jsx - SQL View
frontend/src/components/SqlView.jsx - Retry Trace
frontend/src/components/RetryTrace.jsx - Answer Card
frontend/src/components/AnswerCard.jsx - Clarification Card
frontend/src/components/ClarificationCard.jsx - Failure Card
frontend/src/components/FailureCard.jsx
API Service
- Ask API
api/server.py
Text-to-SQL Agent
- Pipeline Executor
agent/executor.py - Term Resolution
agent/term_resolution.py - Ambiguity Gate
agent/ambiguity.py - Schema Linking
agent/schema_linking.py - SQL Generation
agent/sql_generation.py
Semantic Governance
- Layer Compiler
semantic_layer/compiler.py - Layer Review
semantic_layer/review.py - Semantic Catalog
semantic_layer/layer.yaml
Other components
- Warehouse User
- DuckDB Warehouse
- Groq LLM
Connections 22
- Warehouse User → Question App: asks question
README.md - Question App → Question Input: renders
frontend/src/App.jsx - Question App → Ask API: submits question
frontend/src/App.jsx - Ask API → Pipeline Executor: runs pipeline
api/server.py - Pipeline Executor → Term Resolution: resolves terms
README.md - Pipeline Executor → Ambiguity Gate: gates ambiguity
README.md - Pipeline Executor → Schema Linking: links schema
README.md - Pipeline Executor → SQL Generation: generates SQL
README.md - Pipeline Executor → DuckDB Warehouse: executes and validates
README.md - Term Resolution → Semantic Catalog: matches definitions
README.md - Ambiguity Gate → Groq LLM: phrases clarification
agent/ambiguity.py - SQL Generation → Groq LLM: requests SQL
agent/sql_generation.py - SQL Generation → Schema Linking: uses linked schema
README.md - Layer Compiler → DuckDB Warehouse: profiles schema
semantic_layer/compiler.py - Layer Compiler → Layer Review: proposes definitions
semantic_layer/review.py - Layer Review → Semantic Catalog: writes reviewed layer
semantic_layer/review.py - Question App → Resolved Terms: renders
frontend/src/App.jsx - Question App → SQL View: renders
frontend/src/App.jsx - Question App → Retry Trace: renders
frontend/src/App.jsx - Question App → Answer Card: renders
frontend/src/App.jsx - Question App → Clarification Card: renders
frontend/src/App.jsx - Question App → Failure Card: renders
frontend/src/App.jsx