What’s coming to the AI Client in WP 7.1

With WordPress 7.1 on the calendar and the release squad announced, it’s time to start planning what we’re aiming for this release. While the CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. AI team has produced many AI features and tools (such as the AI plugin), the main work in WordPress core at this point is the Abilities API and the AI Client. In this post, we’re going to focus on the AI Client.

The current state of the AI Client is to be the foundational piece for programmatically running AI inside of WordPress. The AI plugin repo has a growing list of features powered by the AI Client. There’s still no visible AI within the default WordPress interface and this is because the present focus is on empowering the ecosystem of pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. authors.

The work planned for 7.1 is going to be a continuation of this effort. We’ll continue to build and to use the AI plugin to explore and provide AI features native to WordPress.

Generation Streaming

When using AI agents, you may have noticed that the agent streams its response back to you. This isn’t a superficial feature, it’s actually the server literally streaming the generated text back to you in real time. The idea is that it gives the user immediate visual feedback instead of just having a “please wait” type of experience.

This is trickier than it sounds to pull off in WordPress. For streaming to work, this requires the server to allow for long, up to multi-minute, requests. However most servers will timeout after 30 seconds, and the requests system within WordPress doesn’t support this by default.

For this reason, we’re starting by introducing streaming to the PHP AI Client, the underlying framework which powers the AI Client but isn’t coupled to WordPress. This means streaming will be available within WP 7.1, but not as something naturally supported by WordPress. This will allow developers and hosts to dig into this and begin building support for WordPress in a future release.

Embeddings

A bit of a deeper concept within AI is the concept of embeddings. Put simply, an embedding is a numerical value that an algorithm assigns to a piece of data to represent its similarity to other data. This is particularly useful when searching, as embeddings can help identify related items quickly, even when they don’t appear similar on the surface. 

Imagine, for example, searching for “how do I reset my password?” There may be a page called “Account recovery steps”, but you’ll notice these don’t share a single word. However, they’re related in terms of meaning. Embeddings provide an AI-powered way of relating these concepts so a search like this would work perfectly.

These embeddings are handled via a special process called “vectorization” and recent versions of MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com and MariaDB have added native support for vector storage. There’s currently an experiment being built in the AI plugin for adding vector search.

Many different providers support AI models that generate embeddings. Adding support for embeddings to the AI Client will improve accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) for this powerful feature. This could pave the way for incredible, powerful new ways of searching across content in WordPress!

Minor fixes and improvements

This isn’t everything. There will also be minor, backward-compatible fixes and enhancements to continue to improve the reliability of the AI Client. As we battle test and improve it, we’ll build the confidence to incorporate more features into core.

Thank you for reading this and, as always, everyone is welcome to join the WordPress SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/ and find us in the #core-ai channel! Don’t worry if you’re a developer or not. We appreciate all contributions and questions!

Props to @justlevine, @annezazu, @thelovekesh, @jeffpaul, @nikskyverge for pre-publish review.