feat(analytics-skill): extract ranking values from prose across phrasings and dialects#351
Open
kevinmessiaen wants to merge 3 commits into
Open
feat(analytics-skill): extract ranking values from prose across phrasings and dialects#351kevinmessiaen wants to merge 3 commits into
kevinmessiaen wants to merge 3 commits into
Conversation
…nking magnitude When the ranking value lives in a free-text column, extract the numeric token with its separators before the strip/scale/cast pipeline; after ranking a parsed-from-text metric, re-check parse coverage so dropped high-magnitude values can't silently sink the true leaders out of a top-N. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Q2q8GTZBn98eg6zUjDxvR
Each dialect note gains an Extract-from-text bullet giving that engine's separator-preserving idiom (regexp_extract/REGEXP_SUBSTR/extract, or a positional PATINDEX/INSTR hand-roll for tsql/sqlite), so the analytics skill's 'get the regex-extract idiom from sql_dialect_notes' reference resolves to a real per-engine recipe. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Q2q8GTZBn98eg6zUjDxvR
…sing join key Root-cause correction for the deps_dev_v1 fork-count failure: the dominant cause is not comma-stripping but (1) the same fact phrased several ways in the narrative, so a single regex drops every other form to NULL, and (2) a table with no structured key whose identifier lives only in prose. Reframe the extract rule to sample distinct phrasings and COALESCE one pattern per phrasing; add a schema-linking rule that parses a missing join key out of the prose; note a second phrasing as a cause in the parse-coverage check. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Q2q8GTZBn98eg6zUjDxvR
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Changes
packages/cli/src/skills/analytics/SKILL.md— three new SQL-craft rules (extract-across-phrasings, prose-as-join-key, parsed-metric top-N coverage gate)packages/cli/src/context/sql-analysis/dialects/*.md— extract-from-text idiom for all 9 enginespackages/cli/test/skills/analytics-skill-content.test.ts— assertions guarding the three new rules