Repository navigation
Tracking: Implement Embedding Support #962
Description
Overview
This issue tracks the implementation of embedding support in the WordPress AI plugin. Existing embedding work (#683, #891, #943) should be divided into smaller, independently reviewable PRs rather than combining foundational architecture and user-facing features into large feature PRs.
Proposed Work
- Add embedding support from the PHP AI Client Bring over latest embeddings code from the PHP AI Client #975 (Force a model to be passed when generating embeddings instead of relying on the model resolver php-ai-client#274)
- Release 1.5.0 php-ai-client#284
- pull in PHP AI client 1.5.0 into WP AI client and any related updates for this in Core AI: Update PHP AI Client to 1.5.0 and introduce WP_AI_Client_Embedding_Builder wordpress-develop#12530
- unvendor PHP client version
- Add embedding model support ai-provider-for-google#30 & Google connector release
- Implement the storage and CRUD layer for embeddings Add a portable storage and CRUD layer for embeddings #976
- Add background synchronization and large-scale processing #1036
- Add low-level similarity and calculation utilities Add embedding similarity calculations #993
- Document the architecture and developer-facing APIs for Embeddings support #1037
- Complete embedding model declarations or support in connector plugins where it remains missing (Add embedding model support ai-provider-for-google#30)
- Build individual features, such as semantic search (New Experiment: Semantic search in wp admin #844) or frontend chat (Frontend chat agent powered by site content #142), on top of the shared foundation
Each PR should generally:
- Branch independently from the
developbranch - Be reviewable and mergeable on its own
- Avoid including user-facing features before the required foundation is available
- Include focused tests and documentation
Related PRs may be stacked when a direct implementation dependency makes that more practical.
Testing
Local models, including Ollama, should be supported as a practical way to test embedding workflows without ongoing provider API costs.
Embeddings generally only need to be regenerated when their source content changes. Similarity calculations and other operations using stored embeddings should not require additional provider requests.
Links to the relevant issues and PRs should be added to the checklist above as the work is defined.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIn discussion / Needs decision
Activity
dkotter commentedon Aug 20, 2026
Note that the first part of this (pulling in embedding support from the PHP AI Client) was done in #892. After further discussion though, some changes were requested on the PHP AI Client side and we have WordPress/php-ai-client#274 opened now to address that. Once those changes are approved, we'll want to bring those back into the AI plugin and re-enable the loading of this that was removed in #946.
ColinM-sys commentedon Aug 22, 2026
Following up from #943 — I tested php-ai-client#274 end-to-end against a local Ollama (full report: WordPress/php-ai-client#274 (comment)). Unit suite green on PHP 7.4–8.5, 36/36 live cases pass, and the no-model auto-selection that #274 removes is reproducible on
trunk.One concrete item it surfaces for the first checklist entry: #274 removes
usingProvider()andusingModelPreference()fromEmbeddingBuilderin favour of a requiredusingProviderModel().generate_embeddings()inincludes/helpers.phpcalls both removed methods, and the semantic-search callers in #891 / #943 passmodel_preference => [ $model ], so re-enabling embedding support once #274 is re-vendored (the #946 follow-up) means moving that wrapper and its callers to an explicit provider + model.I'd like to take:
Embedding_Storethat records provider ID + model ID (and dimensions) alongside every vector, so an index can never be queried with vectors from a different model, plus the bounded indexed-ID lookup from Semantic (vector) search for the AI plugin — fixes, tests & validation atop #891 #943 and tests. Independent of Bump svgo from 3.3.2 to 3.3.3 #274, so it can go first.generate_embeddings()wrapper update for the newusingProviderModel()API, as part of bringing Bump svgo from 3.3.2 to 3.3.3 #274 back into the plugin.Both as small PRs off
develop, tested against Ollama. Will link them here as they open.4 remaining items