Sync, re-index and clear a knowledge base
Keep a knowledge base up to date: automatic re-indexing, syncing a new selection, clearing the index, and sync messages and errors.
Selecting content tells Promptor what to learn. Indexing is what actually teaches it. Until an item is indexed, the assistant cannot answer from it.
Most of the time Promptor keeps the index up to date by itself. You sync by hand mainly after you change the selection.
Automatic re-indexing
In Free and Pro, Promptor watches the content you selected:
| What you do in WordPress | What Promptor does |
|---|---|
| Publish or update a selected page, post or other item | Re-indexes it right away, with its new text |
| Edit a selected file's details in the Media Library | Re-indexes the file |
| Unpublish a selected item, or move it to the trash | Removes it from the index |
| Delete a selected item permanently | Removes it from the index and from the selection |
| Add, edit or delete a Q&A entry | Indexes or removes it the moment you save. See Add Q&A entries. |
On the content screen, the Automation card confirms this under Keep the index fresh. There is nothing to switch on. Like any indexing, it needs your OpenAI API key under Settings › AI Behavior.
With Auto-Add on Publish (Pro) turned on, new content you publish is also added to the knowledge base and indexed. Without it, select new content on the content screen and sync. See Choose content and set content roles. Compare plans.
What Sync does
When you click Sync on a knowledge base card, Promptor compares your current selection with what is already indexed:
- items you added to the selection are indexed
- items you removed from the selection are taken out of the index
- items that are already indexed are left as they are
The Log box at the bottom of Knowledge Bases › Manage shows each step. When it finishes, the card's Indexed Docs / Chunks counter updates.
Sync a knowledge base
- Click Knowledge Bases in the top navigation.
- On the knowledge base's card, click Sync.
- Watch the Log box. You see one of these messages:
| Message | Meaning |
|---|---|
| "N items will be added." | Promptor is indexing N new items, one after another. |
| "N items removed from knowledge base. Sync completed." | Items you deselected were removed. Nothing new to add. |
| "Knowledge base is already up to date. Nothing to sync." | Your selection and the index already match. |
| "No content selected. The index for this knowledge base has been cleared." | Nothing is selected, so the index was emptied. |
You can also sync from the content screen with Save & Sync. It saves your selection, syncs and writes starter questions in one go. See Choose content and set content roles.
Rebuild the whole index
Sync skips items that are already indexed. Normal edits don't need it, because updating a page re-indexes it. Rebuild the index by hand only when content changed without being saved in WordPress, for example after an import, or when a page shows text from another place (a shortcode, a reusable block) that you changed:
- On the knowledge base's card, click Clear Index.
- Confirm the message "Are you sure you want to permanently delete all indexed data for this knowledge base?"
- Click Sync.
Promptor indexes all selected items again with their current text. Your selection and roles are kept.
Don't click Sync on a knowledge base filled by the website crawler (Pro). Sync works from the hand-picked selection, so it removes the crawled pages. Run the crawler again instead.
Clear the index
Clear Index removes every indexed chunk for that knowledge base. It does not change your selection, roles or example questions.
- Click Clear Index on the card.
- Confirm.
You see "Knowledge base "default" has been cleared successfully. N records removed." The counter drops to 0 / 0.
After clearing, the chat has nothing to answer from until you sync again. Visitors see "📚 The Knowledge Base is currently empty…". Sync right away.
How indexing works
For each item, Promptor:
- takes the item's content from the editor, runs its shortcodes and removes the HTML (for files, the file's text; for Q&A entries, the question and answer)
- splits the text into chunks of up to 1,000 characters
- sends the chunks to OpenAI's
text-embedding-3-smallmodel in one batch - saves the chunks and their embeddings in your database
Indexing uses your OpenAI API key, even if chat answers come through the WordPress AI Client. It makes a small number of OpenAI requests per item, which OpenAI bills to your account. These indexing requests are not counted in Settings › AI Usage.
Indexing errors
| Message | What to do |
|---|---|
| "OpenAI API Key is not set…" | Indexing needs your own OpenAI API key, also during the free trial. Add it under Settings › AI Behavior (the message still names the old "API Settings" tab). See Get and add an OpenAI API key. |
| "Nothing could be indexed. Check your AI provider key under AI Behavior, then try again." | The key is missing or invalid, or OpenAI refused the request. Click Verify Key on Settings › AI Behavior. |
| "WooCommerce product indexing is a Pro feature." | Products can only be indexed with Pro. |
| "PDF indexing is a Pro feature. TXT and Markdown files work in the free edition." | PDF and DOCX files can only be indexed with Pro. See Add TXT, Markdown, PDF and DOCX files. |
| "You are using Promptor Lite. You can select a maximum of 35 content items…" | The free version's limit is reached. Remove items you don't need, or upgrade to Pro. |
For more, see Error messages explained.
Related
Still need help?
Our support team answers every ticket. Tell us your WordPress version, Promptor version and what you see.
