Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The roadmap lists "Curated domain-specific semantic model templates" among its deliverables, with retail among the models that organizations keep recreating. Its Developer Experience section asks for "annotated examples, especially for AI context fields" (discussion #9). This adds a model of an online store whose
ai_contextis written for an agent.examples/commerce.yamlisentities/commerce.yamlof the dactopus-data-models 0.11.1 release (https://github.com/Dactopus/dactopus-data-models/releases/tag/v0.11.1), unchanged except for the license header and a title comment. The model keeps developing in the library; this copy is a snapshot of the tag, and the checks below reproduce from it.What it shows:
ai_context.instructionsfor an agent: how the platforms' sales reports count orders, customers, categories and brands, and which metric answers which question.ai_contextis set on 99 of the 100 fields and on all 43 metrics.(source_id, id):source_idis the store a row comes from, so several stores share one deployment.sqlform.Two parts of the model go beyond Layer 3 (
core-spec/wide_table_semantics.md):orders.average_order_value,line_categories.category_path,line_categories.is_direct,product_categories.is_direct) suggest a filter on the many side, such as the average order value of the orders with a line in a category. Appendix A.1 lists such existence filters for a later version.ordersand one of its line or refund datasets in one aggregate. Section 5.2 rejects that for now as deferred.The model's answers are checked against fixtures of two stores, one on Shopify and one on WooCommerce. The fixtures are the canonical tables as CSV, with DDL in standard SQL. With them come 95 questions and expected rows derived by hand (
tests/<package>/questions.yamlin the library, run bytests/run_canon.py). On ClickHouse 26.9, through dactopus-ossie-clickhouse 0.13.0, all 95 return the expected rows. On DuckDB 1.5.6 with the community extension ossie 0.3.0 the runner first lifts the dataset-scoped metrics to the model level, because the extension does not read them yet. Then 72 questions return the same rows. The extension refuses 19 (two grains in one question, a filter on the many side, a question without a metric). The other 4 differ because it emits every join asINNER, as itsdocs/limitations.mdsays, so rows without a match drop out.validation/validate.pyonmain(0a908aa) passes. The PR also adds the file to.github/workflows/validation-ci.ymlnext to the other examples, so a schema change that breaks it fails CI.versionstays0.2.0.dev0; if #691 lands first, I will bump it.