Repository navigation
Conversation
Contributor
✅ Preview is ready!
↩️ Previous: ⚡️ 🤖 Powered by surge-preview |
|||||||||||||||
yvonneyx
force-pushed
the
copilot/paper-reproduction-implementation
branch
from
October 19, 2026 06:19
1eaa20a to
d2da641
Compare
Co-authored-by: yvonneyx <55794321+yvonneyx@users.noreply.github.com>
yvonneyx
force-pushed
the
copilot/paper-reproduction-implementation
branch
from
October 19, 2026 08:28
d2da641 to
ccc93cb
Compare
- Added support for YAML configuration in semantic models. - Introduced `validateSemanticQuery` method in DuckDB engine for semantic validation. - Created a new `semantic.ts` file to handle semantic query parsing and validation. - Updated semantic model definitions to include metrics alongside dimensions and measures. - Enhanced SQL dialect support to include BigQuery and Snowflake. - Improved error handling for ambiguous references in semantic queries. - Refactored the semantic registry to accommodate new metric types and validation logic. - Updated the planner to handle new join types and conditions. - Adjusted the schema validation to enforce stricter rules on model definitions.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Reproduces the semantic-layer-mediated NL2SQL agent from the paper. Semantic models and joins are defined explicitly. A deterministic compiler turns Semantic Model Queries (SMQ) into trusted SQL, and a constrained Think–Act loop composes the final query from that SQL.
directandloopare unchanged, so the three can be compared.src/semantic/)model__name. YAML is not supported; configs are an object or a JSON string.JoinGraphfinds the shortest join path between models (BFS) and orients the join keys along it.SemanticRegistry.validateAgainstSchemachecks at analyze time that every model's table exists in the engine schema.compiler/)compileSMQsupportsmetrics,filters,group_by,order_byandlimit.IN,LIKE,BETWEEN,IS NULLandAND/OR/NOT. Subqueries and;are rejected.HAVING. Mixing dimensions and metrics in one filter is an error.engine.language.name.semanticstrategy (analysis/semantic.ts)getModelDataElements,convertSmqToSql(with a 5-row preview) orexecute.executeis terminal and runs at most once. A failed run is not retried.executeis rejected, without running, if no SMQ has compiled successfully yet, or if the final SQL uses a table that no compiled SMQ introduced.maxStepsdefaults to 20. A last-step hint tells the model to execute.AVA.semantic(),AVA.compileSMQ(),semanticonAnalysisRuntime, the strategy union entry and the exported types.For review
generateText, not native AI SDK tool calling. This keeps one call per step and makes the loop easy to mock. I can switch to native tools if you prefer.FROM/JOINnames. It handles CTEs andEXTRACT(… FROM …)but is not a SQL parser.semantic, and there is no real-LLM accuracy comparison againstdirect/loopyet.