Creating WordPress Posts, Pages, and Custom Post Type Embeddings with Volt Vectors

Creating WordPress Posts, Pages, and Custom Post Type Embeddings with Volt Vectors

Embedding custom WordPress content into vector representations can be a powerful way to enable new applications like semantic search. In this post, we’ll walk through how to create custom embeddings from WordPress using Volt Vectors.

Overview #

Volt Vectors allows you to convert WordPress content like posts, pages, and custom post types into vector representations called “embeddings.” These embeddings capture the semantic meaning of the content and allow it to be compared and searched in powerful new ways.

In this tutorial, we’ll embed a custom post type in WordPress and save the embeddings to a MySQL database.

Prerequisites #

To follow along, you’ll need:

  • The Volt Vectors plugin installed in your WordPress site
  • A custom post type set up in WordPress
  • MySQL enabled as a storage option in Volt Vectors

Step-by-Step Instructions #

Follow these steps to create an embedding from a custom post type:

1. Compose the custom post #

First, create or edit the custom post type content you want to embed. For this example, we’ll use a post with the title “Understanding Prompts and Volt Vectors.”

The content itself can be anything – text, images, PDFs, etc. Volt Vectors will process the textual content.

2. Open the Volt Vectors embedder #

In the WordPress admin, go to the Volt Vectors menu. Click on “Embedder” to launch the embedder tool.

3. Configure the embedder settings #

In the embedder, fill out the settings:

  • Document title: You can customize the title that will be used for the embedding. We’ll leave it as the post title.
  • Document content: Select the custom post you want to embed from the dropdown.
  • Metadata: Optional date or other metadata to associate with the embedding.
  • Author: Optional author name to store.
  • Source: Optional source URL to store.
  • Profile: Select the chunking profile to use. We’ll use the default Volt simple profile.
  • Namespace: Customize the namespace if desired. We’ll set to “guides” for this example.

4. Publish the embedding #

Click “Publish” to generate the embedding. This will process the content and store the vectors in the MySQL database.

Note that you can edit the content later and re-publish to update the embedding.

5. Create tokens #

After publishing, click “Create Tokens” to finalize the vector indexing.

The embedder will display details on the number of tokens generated and estimated cost.

6. Manage embeddings #

To view existing embeddings, click “Manage Embeddings” in the Volt Vectors menu.

Here you can update, restore, or permanently delete embeddings.

And that’s it! The custom post content is now embedded and ready to power semantic search and other applications. Let us know if you have any other questions!