Bulk OpenAI Assign Terms

How to Assign Terms with OpenAI and BTE?

In this tutorial, we will explore how to automatically assign taxonomy terms to posts using the OpenAI Bulk Editor.

Our use case involves categorizing a product into appropriate subcategories based on its main category.

Install and Configure

The first step is to download the OpenAI Bulk Editor from Code Market.

Once downloaded, make sure all required components are correctly installed, starting with the Bulk Task Editor (BTE), which is responsible for managing batch processing tasks and coordinating task execution across posts.

These components work together to process selected posts and communicate with OpenAI’s API for content analysis.

Setup a New Task

With everything installed, go to the Tasks panel in your admin dashboard and create a new Post Type Task.

Give the task a clear name and select the appropriate post type (e.g., posts, pages, or a custom type).

Use the Filter form to choose which posts should be processed.

You can filter by criteria like post status, category, or individual page IDs.

As you adjust the filters, you’ll see a “Matching items” count that updates automatically to reflect the number of selected posts.

You can click “Preview” next to this count to view a sample of the selected items.

Note: It’s a good practice to test the setup on a single item first using the Page ID filter. This helps ensure your configuration is correct before processing a large number of posts.

Assign Post Terms

To begin assigning taxonomy terms, go to the Task form and select the action “OpenAI – Assign Taxonomy Terms“.

Add replace terms option

Next, choose whether you want to add new terms to existing ones or replace them entirely.

Then, select the taxonomy you want to target.

You will be prompted to provide a list of terms that the AI should consider during processing:

  • Terms should be relevant to the post content
  • You can choose to include child terms in the match

After that, configure the AI settings. Select the model (e.g., GPT-4) and set the temperature according to how creative or strict you want the matching process to be.

Write clear system instructions that explain how the terms should be assigned. For example:

  • Determine and assign the most relevant terms based on the following content.
  • Include broader categories along with specific subtypes where relevant.

The system will analyze each post using the content listed in the prompt section, and assign taxonomy terms accordingly.

Use the following shortcodes to include dynamic contents into the prompt:

Product {{post.title}}
{{post.content}}
{{post.excerpt}}
Meta {{meta.name_of_the_meta}}

Once the task is fully configured, scroll to the Process form. Set the Task Status to “Start” and click “Update” to begin the batch operation.

If you are using AJAX mode, make sure to keep the page open in your browser while the task runs. The progress will update in real time until it reaches 100%.

Leave a Reply

About Rafasashi

Currently managing RECUWEB an IT Company providing cloud hosting and SaaS delivery model.

Related posts