Skip to content

Tag new gallery proposals with language and generativeai tags - #97

Open
Jay Gordon (jaydestro) wants to merge 6 commits into
AzureCosmosDB:mainfrom
jaydestro:fix/proposal-tags
Open

Jay Gordon (jaydestro) wants to merge 6 commits into
AzureCosmosDB:mainfrom
jaydestro:fix/proposal-tags

Conversation

@jaydestro

@jaydestro Jay Gordon (jaydestro) commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

New cards from the weekly audit were created with only the source type tag and microsoft, so they never matched the language or Generative AI filters.

  • The classifier now returns topical tags for each new item, restricted to tags defined in src/data/tags.tsx and following how existing entries are tagged. Source-owned tags (blog, video, microsoft, and similar) are dropped. Keyword inference is the fallback, and a floor guarantees generativeai for AI content and the repository language for GitHub candidates.
  • GitHub repository language is carried through discovery into a language tag (at most two language tags per card).
  • Backfill: existing entries with neither a language nor a generativeai tag got inferred tags, repo entries got their verified GitHub language, and a small set of legacy AI entries received topical tags from the classifier model (additions only).
  • Add one-off helpers to backfill the catalog, retag with the model, and rewrite Tags lines in proposal issues.
  • Tests: npm run test:gallery-audit passes (78 tests).

Jay Gordon and others added 2 commits October 8, 2026 11:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Classifier validation permits conflicting source tags, and several catalog classifications are inaccurate or incomplete.

5 open findings
What changed in this PR

Adds taxonomy-aware tagging so audited gallery entries appear under appropriate language and Generative AI filters.

Changes:

  • Integrates inferred and classifier-provided tags into promotion.
  • Backfills catalog tags and adds one-off retagging utilities.
  • Updates classification guidance and tests.
File Description
static/​templates.json Backfills tags on existing cards.
scripts/​gallery-audit/​tags.mjs Implements tag inference and normalization.
scripts/​gallery-audit/​promotion.mjs Applies tags during promotion.
scripts/​gallery-audit/​core.mjs Captures repository language metadata.
scripts/​gallery-audit/​copilot.mjs Supplies and validates classifier tags.
scripts/​gallery-audit/​backfill-tags.mjs Adds deterministic catalog backfill.
scripts/​gallery-audit/​retag-with-llm.mjs Adds model-assisted topical retagging.
scripts/​gallery-audit/​update-issue-tags.mjs Rewrites proposal issue tags.
scripts/​gallery-audit/​test/​tags.test.mjs Tests tagging behavior.
.github/​gallery-audit/​relevance-prompt.md Adds classifier tagging instructions.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/gallery-audit/copilot.mjs Resolved
Comment thread scripts/gallery-audit/tags.mjs Resolved
Comment thread static/templates.json Resolved
Comment thread static/templates.json Resolved
Comment thread static/templates.json Resolved
@jaydestro

Copy link
Copy Markdown
Collaborator Author

Copilot please address the five open review threads on this PR in this branch. Keep changes minimal, add or update tests in scripts/gallery-audit/test/tags.test.mjs where behavior changes, run npm run test:gallery-audit, and push to this branch. Do not merge.

  1. scripts/gallery-audit/copilot.mjs (validateItem): drop source-owned tags (blog, video, documentation, example, deck, tools, microsoft, community, featured) from classifier tags so they cannot conflict with source defaults.
  2. scripts/gallery-audit/tags.mjs (inferTags): apply the "at most two language tags" cap after appending the GitHub repository language, so a card never ends up with three.
  3. static/templates.json, "How to Store AI Chat History with Azure Cosmos DB": remove ragPattern; keep generativeai and chat.
  4. static/templates.json, haystack-azure-cosmosdb: it is a Cosmos DB for NoSQL document store and vector-search retriever, so add generativeai and vectorcosmosnosql (keep python).
  5. static/templates.json, "Azure Cosmos DB Agent Kit": remove the added agent tag so entries that already had generativeai and a language are untouched.

Co-authored-by: jaydestro <2974195+jaydestro@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Repository-language priority and the two-language cap are not consistently enforced.

1 open finding
5 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Medium severity Enforce the two-language cap on classifier output

scripts/​gallery-audit/​promotion.mjs:25

Classifier-provided languages bypass the two-language limit: validation permits any taxonomy tags, and this concatenation can publish python, java, and go together even though inferred tags are capped. Apply the cap to the final classifier-plus-floor result before merging it into the catalog.

🧠 Review effort: Balanced

Comment thread scripts/gallery-audit/tags.mjs Resolved
@jaydestro

Copy link
Copy Markdown
Collaborator Author

Copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply the suggestion exactly.

Do not make changes beyond what is described in the linked review thread.

@markjbrown

Copy link
Copy Markdown
Contributor

Jay Gordon (@jaydestro) Sajeetharan (@sajeetharan) can this be merged? Been sitting here for a few weeks.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants