Skip to content

Improve Workers AI model catalog search discoverability - #27188

Closed
mattrothenberg wants to merge 1 commit into
cloudflare:productionfrom
mattrothenberg:improve-model-catalog-search
Closed

Improve Workers AI model catalog search discoverability#27188
mattrothenberg wants to merge 1 commit into
cloudflare:productionfrom
mattrothenberg:improve-model-catalog-search

Conversation

@mattrothenberg

@mattrothenberg mattrothenberg commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

Problem

A user reported they couldn't find moderation/safety models when searching for "moderation" in the model catalog. The search only checked model names, missing relevant models like llama-guard-3-8b that are designed for content moderation and safety classification.

Solution

This PR improves search discoverability by:

  1. Expanding search scope - Search now includes model name, description, AND tags (previously only searched model name)
  2. Adding relevant tags - Added tags to Llama Guard models: ["moderation", "safety", "content-filtering", "guardrails"]
Screen.Recording.2025-12-16.at.8.46.57.PM.mov

Changes

  • src/components/ModelCatalog.tsx - Updated search filter logic to check name, description, and tags
  • src/content/workers-ai-models/llama-guard-3-8b.json - Added moderation/safety tags
  • src/content/workers-ai-models/llamaguard-7b-awq.json - Added moderation/safety tags

Impact

Users can now find safety/moderation models by searching:

  • "moderation"
  • "safety"
  • "content-filtering"
  • "guardrails"
  • "classification"

Important

The model JSON files are generated by bin/fetch-ai-models.js which fetches from https://ai-cloudflare-com.pages.dev/api/models. The tags I added will be overwritten the next time this script runs.

Should we:

  1. Add tags upstream to the API source, OR
  2. Maintain a local post-processing step to add tags after fetching, OR
  3. Some other approach?

Documentation checklist

},
"created_at": "2024-02-06 18:13:59.060",
"tags": [],
"tags": [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If these aren't present on the upstream data source, they won't persist for the next update.

@thatsKevinJain, is that something you can help with?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I should have followed up here. We've made + merged some changes that enable adding these tags upstream and exposing them over the API.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1, the API is updated to surface these tags.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The API is updated to surface the new tags, we should be good to merge this PR

@mattrothenberg

Copy link
Copy Markdown
Contributor Author

@kodster28 the API has been updated to provide these tags so I think this PR is good to go now!

@github-actions

github-actions Bot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Hey there, we've marked this pull request as stale because there's no recent activity on it. This label is helps us identify PRs that might need updates (or to be closed out by our team if no longer relevant).

@github-actions github-actions Bot added the stale label Feb 6, 2026
@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

Hey there, we've closed out this pull request because it's been stale for a while and there's been no additional action on it. If these changes are still relevant, open a new pull request (or flag to us in a GitHub issue).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants