Repository navigation
Conversation
…nc related functionality
… Add in necessary methods to more easily utilize the coarse values
…hen a more in-depth rank of those results. Built to support this particular feature but also work for other use cases
…d or visible based on other settings. Add the ability to set a different set of capabilities than the model chosen
… and then compares against terms, ranking from closest to farthest match. Update our ability to use this when embedding mode is on
…atus of a backfill
…ly for things like hidden and disabled fields, model picker and status of the sync
…cs; better copy; skip processing if we have no terms; skip bad vectors
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
… in the method and model they want, so they can use the ability without having to use the experiment or it's UI
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1252 +/- ##
=============================================
+ Coverage 85.14% 85.39% +0.25%
- Complexity 4826 4996 +170
=============================================
Files 189 192 +3
Lines 17910 18501 +591
=============================================
+ Hits 15249 15799 +550
- Misses 2661 2702 +41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Hi @dkotter Tested this locally (LocalWP + Ollama with
|
…tus. This ensures we show the proper state when first toggled on'
…y show what is done, not what is being processed
|
Thanks for testing @itsgajendraSingh!
I'm assuming this is referring to the button on the settings screen? If so, you should see a progress message (screenshot). Do you not see that? I have added a spinner next to it now to make it more obvious loading is in progress.
Thanks, I was able to reproduce this. Should be addressed in 5daaf99
This is expected as it's just the standard term UI that WordPress uses. Clicking the icon just removes the term but we don't store that anywhere. That's a potential idea we can think about though, saving that dismissal and assuming that means someone doesn't want to ever see that term suggested again on that post. Not sure if that is what people would expect to happen or not though. |
|
Thanks @dkotter! Pulled the latest changes and tested again, both work as expected now:
For point 3, a couple of ideas:
I think the second option might be simpler to start with since it doesn't need any extra storage. What do you think? Curious to hear your thoughts on whether something like this would make sense here. |
I'm not opposed to trying this out though I think this should be applied to the result regardless of whether embeddings mode is on or not, meaning it's likely something best to add in a separate PR instead of having that be tied to this one. There's a few things I'd call out though. First, users can choose the maximum number of terms to show (default is 5). So if we show additional ones as existing ones are removed, technically we aren't respecting that maximum anymore. That setting instead becomes a maximum that we show at once, not a maximum we show ever. That may be fine but don't want to confuse people that have purposely set that number. We also don't show terms that are below our threshold and I think we'd want to keep that. So likely scenarios where we don't have more than 5 to show once we filter out those low quality results. |

What?
Adds an embedding-based "Similarity matching" mode to the Content Classification experiment. It's the first real feature built on the embeddings stack.
Why?
The embeddings work so far (#976, #1088, #1135) added storage, math and background sync, but nothing user-facing used it. This PR proves that stack works in a real feature (and surfaced a few areas that needed improvements/changes). It also gives Content Classification an option that suggests existing terms by meaning, with no post content sent to a language model.
How?
ai/v1/embeddings/consumers/{id}. Changing the model clears the old model's vectors.Embedding_Suggesterembeds the post (title and content) on click, reusing stored vectors if the text hasn't changed. It then ranks term vectors by cosine similarity, applying a minimum score (0.3) and a minimum term usage count (2).Similarity_Searchdoes a quick first pass on the one-bit coarse codes, then reranks a shortlist by exact cosine similarity, so large taxonomies never get loaded fully into memory.Notes: I ran this on a site that had ~26,000 terms and using Ollama, took about 7 minutes to generate embeddings for all of them using the admin UI (CLI command was slightly faster). Testing with OpenAI, took about 17 minutes. Actually running comparisons only took about 1 second
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Fable 5.1, Opus 5.5
Used for: Initial design spec and implementation plan; review of plan by me; execution of plan by AI with final review and testing by me.
Testing Instructions
Settings > AI, open Developer Tools, and turn on Advanced settings.text-embedding-3-small), and save.wp ai embeddings sync run).Screenshots or screencast
Changelog Entry