Bug: KB not updating after document replacement and re-sync
I’m running into a KB syncing issue. I replaced a “Settings.docx” file (deleted the old one, uploaded the new version, and re-synced). But the AI Agent still pulls info from the old file — including a client I had removed. This is happening across multiple agents, so it seems like the old data is stuck in cache.
Steps to Reproduce:
1. Upload a document (“Settings.docx”) to feed the KB.
2. Edit the document (e.g., remove a client).
3. Delete the original file from KB.
4. Upload the new version.
5. Re-sync the agent.
6. Ask a question related to the removed content.
Expected Result:
AI Agent should ignore the removed client and only respond from the updated document.
Actual Result:
The Agent continues to reference the removed client, as if the original document is cached.
Notes:
• Issue also occurs in other AI Agents, not just one.
• Resync + re-upload does not clear outdated data.
28 Replies
Hey there!
When you want to swap a file that’s already in your Knowledge Base, the safest path is to replace the document in-place (so the same documentID is kept) rather than deleting and re-uploading it under a new ID. Why this matters • Every KB document is chunked and stored under its unique documentID.
• If you delete then re-upload, the old chunks are put in a deletion queue while the new file is queued for re-chunking. During that short window your Agent can still fetch the “orphaned” chunks, so you’ll see answers that reference removed content. How to fix it 1. In the KB UI use ⋯ → Replace file (or call the Replace Document endpoint – see docs below). This keeps the same documentID and guarantees the old chunks are purged the moment the new file finishes processing.
2. Wait until the file’s status turns Synced (green check).
3. Click Re-sync in the Agent step and republish your assistant. After the status is Synced, a KB preview query or a live Agent query should no longer surface the removed client name. API reference (for automation) • Replace document (non-URL file types): https://docs.voiceflow.com/reference/replace-document-non-url
• Replace document (URL sources): https://docs.voiceflow.com/reference/replace-document-url If you still see stale content after the file shows Synced, give it a few minutes (the deletion job can take a couple more moments to propagate). Then run a Preview inside the KB; if the removed client still appears there, let us know – that would indicate the purge job didn’t complete. Hope that clears it up! :rocket:
When you want to swap a file that’s already in your Knowledge Base, the safest path is to replace the document in-place (so the same documentID is kept) rather than deleting and re-uploading it under a new ID. Why this matters • Every KB document is chunked and stored under its unique documentID.
• If you delete then re-upload, the old chunks are put in a deletion queue while the new file is queued for re-chunking. During that short window your Agent can still fetch the “orphaned” chunks, so you’ll see answers that reference removed content. How to fix it 1. In the KB UI use ⋯ → Replace file (or call the Replace Document endpoint – see docs below). This keeps the same documentID and guarantees the old chunks are purged the moment the new file finishes processing.
2. Wait until the file’s status turns Synced (green check).
3. Click Re-sync in the Agent step and republish your assistant. After the status is Synced, a KB preview query or a live Agent query should no longer surface the removed client name. API reference (for automation) • Replace document (non-URL file types): https://docs.voiceflow.com/reference/replace-document-non-url
• Replace document (URL sources): https://docs.voiceflow.com/reference/replace-document-url If you still see stale content after the file shows Synced, give it a few minutes (the deletion job can take a couple more moments to propagate). Then run a Preview inside the KB; if the removed client still appears there, let us know – that would indicate the purge job didn’t complete. Hope that clears it up! :rocket:
Thanks for your quick reply! My apologies, but I'm not finding the option you mentioned "replace the document in-place"

... actually, in the KB UI, I cannot find the "Replace file", but only; URL(s), Sitemap, Upload file (I tried to upload the file again to see if "Replace file" would be displayed, but not), Plain text and Zendesk.

@Tico | Voiceflow Assistant, could you show me where is the "Replace file", because I didn't find it in the KB UI?
Hi there!
At the moment the Knowledge Base screen in the Creator only lets you download or delete a document from the ••• (three-dot) menu – there isn’t a “Replace file” button in the UI.
If you need to update a file you have two options: • UI workaround → Delete the existing document, then Upload the new version.
• API / CLI → Use the Replace Document endpoint (PUT /v1/knowledge-base/docs/{documentID}/upload) or the CLI command
Hope that clarifies why you couldn’t find the button!
At the moment the Knowledge Base screen in the Creator only lets you download or delete a document from the ••• (three-dot) menu – there isn’t a “Replace file” button in the UI.
If you need to update a file you have two options: • UI workaround → Delete the existing document, then Upload the new version.
• API / CLI → Use the Replace Document endpoint (PUT /v1/knowledge-base/docs/{documentID}/upload) or the CLI command
voiceflow document upload-file --file <path> --overwrite to swap the file in place without changing the documentID.
Docs: https://developer.voiceflow.com/docs/knowledge-base-api#replace-document-fileHope that clarifies why you couldn’t find the button!
Hi @Tico | Voiceflow Assistant,
I did one of your options "UI workaround → Delete the existing document, then Upload the new version", but I understood from your previous message that it isn't enough to clean up the chunk still with the client name I removed from "Settings.docx" file (and the client is still there).
I'm also using Chat-dash, where there is the option to delete/upload documents, which means to be the same for "delete" and "upload" steps, but I'll try that.
The link you provided to the Docs shows "Page Not Found", even without "#replace-document-file".
Hi there 👋
A few quick notes that should help clear things up:
1. Deleting + re-uploading really does wipe the old chunks
– When you click Delete in the KB UI (or in Chat-dash) we immediately remove every chunk that belonged to that document.
– Those deletions propagate to search in ±1-2 minutes. If you open Preview right after deleting you can sometimes still see the old chunks until the index finishes refreshing. Give it a short moment, then try searching for the client name again. 2. Make sure you’re not re-introducing the client name
Double-check the new .docx that you uploaded (track-changes, header/footer, properties, etc.). If the name is still anywhere in the file it will be chunked again and appear in search. 3. One-step “Replace” via API (optional)
If you prefer an atomic update you can hit the Replace Document endpoint instead of the delete-then-upload flow: Send the new file in
4. Correct docs links
The anchor in the earlier message has been renamed – here are the current pages: • Delete document: https://docs.voiceflow.com/reference/delete_v1-knowledge-base-docs-documentid
• Replace document (file): https://docs.voiceflow.com/reference/put_v1-knowledge-base-docs-documentid-upload --- Try waiting a minute after the delete, then search again. If the client name still surfaces let me know and we can dig deeper (it usually means another file still contains it).
– When you click Delete in the KB UI (or in Chat-dash) we immediately remove every chunk that belonged to that document.
– Those deletions propagate to search in ±1-2 minutes. If you open Preview right after deleting you can sometimes still see the old chunks until the index finishes refreshing. Give it a short moment, then try searching for the client name again. 2. Make sure you’re not re-introducing the client name
Double-check the new .docx that you uploaded (track-changes, header/footer, properties, etc.). If the name is still anywhere in the file it will be chunked again and appear in search. 3. One-step “Replace” via API (optional)
If you prefer an atomic update you can hit the Replace Document endpoint instead of the delete-then-upload flow: Send the new file in
multipart/form-data → it fully overwrites the previous version and its chunks.
• Reference: https://docs.voiceflow.com/reference/put_v1-knowledge-base-docs-documentid-upload4. Correct docs links
The anchor in the earlier message has been renamed – here are the current pages: • Delete document: https://docs.voiceflow.com/reference/delete_v1-knowledge-base-docs-documentid
• Replace document (file): https://docs.voiceflow.com/reference/put_v1-knowledge-base-docs-documentid-upload --- Try waiting a minute after the delete, then search again. If the client name still surfaces let me know and we can dig deeper (it usually means another file still contains it).
Voiceflow
Replace Document (url)
Replaces the document and document name in the Knowledge Base, by documentID (of type "url" only). Limit one per call.
@Tico | Voiceflow Assistant,
Thanks for your attention and support. I’m still experiencing the same issue.
Yesterday evening (BRT), I removed the client’s name from the “Settings.docx” file. This morning, I ran 2+ tests, but the client’s name continued to appear in the answers.
Following your last instructions, I tried again with the following steps:
1. Deleted the “Settings.docx” file.
2. Before re-uploading the “Settings.docx” file, I used the Preview button in the Knowledge Base UI and asked: “What are your customers?”. Since all customers are listed exclusively in the “Settings.docx” file, the response should have shown no customers.
3. However, Voiceflow still displayed almost all customers in the response, as shown in the attached screenshots.
Note: I haven't uploaded the "Settings.docx" file until now, 40+ minutes after.
This makes me believe my instance of Voiceflow may be presenting a systemic issue. I’ve noticed similar behavior before in other agents, but had not reported it.
Additionally, there’s another related issue: the AI Agent randomly switches identity. I assign a fixed name and company identity in the prompt (e.g., “Laura, from Intrace, an AI Agency”), but the agent occasionally introduces itself differently (e.g., “Sara, from Dental Clinical”).
Could this identity-switching behavior be related to the same underlying instance of problem, being in my Voiceflow user?




Hi there – a couple of things you can try.
🗂️ 1) Make sure the file is really gone
• After you delete a document in the KB UI it should disappear from the Documents list.
• If you want to double-check, call the Delete Document endpoint.
If the call returns 200 the file (and all of its chunks) is purged from the index. Tip: fetch
• If you want to double-check, call the Delete Document endpoint.
If the call returns 200 the file (and all of its chunks) is purged from the index. Tip: fetch
GET /v1/knowledge-base/docs first – that will list every document and its documentID, so you can confirm whether a duplicate copy of “Settings.docx” still exists.
After a successful delete the Preview tool should show no sources for queries that relied exclusively on that file. If it still returns the customer names, another document or URL is providing the same content.
🧠 2) Start a fresh test thread
In the canvas or chat-widget, clear conversation memory (or open a brand-new chat). Previously cached dialogue can keep resurfacing the old answer even though the KB has changed.
👤 3) Lock the agent’s persona
Occasional identity switches usually mean the model has enough freedom to invent a new intro. Two ways to tighten it:
1. Put a very explicit instruction in the System Prompt, e.g.
2. Lower the Temperature in the Agent (or Prompt) settings so the model is less creative.
The “Effective prompting” section of the docs has more tips on writing clear, non-ambiguous persona instructions:
https://docs.voiceflow.com/docs/crafting-great-prompts
Give those steps a try and let me know if the Preview still surfaces the deleted content 👍Thanks @Tico | Voiceflow Assistant !
Yesterday morning I deleted the "Settings.docx", but right now I asked a question to the agent "What are your customers?", knowing that the list of customers was in the "Settings.docx" the agent shouldn't find any information about that, but listed all including also the one I had previously deleted.
I haven't tried the endpoints you sent. Seems that I'll need to build an additional panel for testing these issues in Voiceflow, where it should be ensured in its own.
About your item 3, in most of agents I've creating there is a explicit instruction in the "Agent Prompt", but not in the KB UI Prompt. Even so, I'll improve them with you recommendation. However, I'm trying a new approach to have a template for a kind of agent I want to build, for which the name of the agent must come from a document added to the KB, comming from the "Settings.docx" (the problem I reported is not only happening here, but with with this kind of agent, so it is the reason I asked to review my instance of VF installation).
Usually I've been using Temperature between 0.07-0.08 in the LLM for each "Agent Prompt", and 0.3 (for other agents I've been using 0.1) in the "KB UI Prompt". Should I reduce the one used in the "KB UI Prompt" too?
I read the "Crafting great prompts", which I've been applying. Seems that would be deserved a diagnosis in my VF instance.
Hey! a couple of things you can check:
1️⃣ Make sure Settings.docx is really gone from the KB
• Open the KB → click Preview and run a quick search for one of the customer names. If no chunks are returned the file is no longer indexed.
• If you’re using the API you can also
Even after a document is deleted the agent can “remember” the list because the last 25 turns are automatically stored in the
• When you embed the widget you can also set
Temperature on the “KB UI Prompt” only affects how creative the summarisation step is once the right chunks are found. 0.3 is already conservative – lowering it more won’t stop the KB from surfacing deleted content. Keep your Agent Prompt low (≈0.1) for deterministic answers and only tweak if you notice the wording is too random. Quick test path After both steps, a fresh session asking “Who are your customers?” should return NOT_FOUND or a fallback message. Hope that helps you debug! Let me know if anything still looks off.
• If you’re using the API you can also
GET /v1/knowledge-base/docs (or call the List documents KB step) to confirm the documentID isn’t there. If it still is, call DELETE /v1/knowledge-base/docs/{documentID} to remove it.
2️⃣ Clear the conversation memory before retestingEven after a document is deleted the agent can “remember” the list because the last 25 turns are automatically stored in the
vf_memory variable. If you ask the same question in the same session the model will simply reuse that memory – it never goes back to the KB.
• Start a brand-new chat / voice session, or manually wipe vf_memory (there’s a Clear memory block and a REST endpoint).• When you embed the widget you can also set
assistant: { persistence: 'memory' } so every page reload starts fresh instead of re-loading from localStorage.
3️⃣ Prompt temperaturesTemperature on the “KB UI Prompt” only affects how creative the summarisation step is once the right chunks are found. 0.3 is already conservative – lowering it more won’t stop the KB from surfacing deleted content. Keep your Agent Prompt low (≈0.1) for deterministic answers and only tweak if you notice the wording is too random. Quick test path After both steps, a fresh session asking “Who are your customers?” should return NOT_FOUND or a fallback message. Hope that helps you debug! Let me know if anything still looks off.
1. I did it right now. See the list of customers. I'll do the others recommended.

Items 2 & 3...
3. The temperature was set to 0.1, but I reduced it further to 0.09. After that, I tried the "Preview" button again, and all customers were listed once more.
2. Since I closed the project, I have been reporting this issue. Although I had noticed the same problem occurring in other cases, I assumed that the {vf_memory} had been cleared.
Note: in the right and up corner you can see the date and time (BRT) I ran the tests.


Please, I need a human and @Voiceflow Team Account attention.
I just setup the {vf_memory} to empty, but even so, after ask "what are your customers?" the agent replied listing all clients which only exist in the "Settings.docx" deleted yesterday morning (almost 30 hours earlier). Could anybody from Voiceflow help me with this issue? @Braden
After 31 hours... I'm still seeing the list of customers, knowing that they were listed only in the "Settings.docx" which was feeding the KB, but I removed 31 hours ago. @KimLooo, could you, please, help me with this issue?

Hey Alex - have you completely republished your project? (not just resyncing the KB)
Hey @KimLooo, I was testing in the development environment, trying to fix the problem reported, before publish it. Should I add that again the "Settings.docx" file, then publish it?
@KimLooo, I decided to upload the "Settings.docx" file again, then published. Now, I'm doing tests.
kk lmk if the republish to the environment works! if not we can investigate with support
@KimLooo - I'm also using MAKE, because I need to connect with Z-API to send/receive messages - text and audio - from WhatsApp unofficial. The workflow built with MAKE was working before (about 3 hours earlier), but now the Agent in Voiceflow module receives the text as you can see in one of the screenshots attached, but returning Data[] empty. I verified the "VersionID" in the Voiceflow and settings - everything is Ok. Also, we can see in VF the messages received from WhatsApp, but the Agent doesn't reply (we can see in one of the screenshots attached). I'm finising my day today (I'm in Brazil).






@KimLooo - my apologies, insisting on this issue... I just tried this morning, and the problem persist. Since Voiceflow receives the message throught the API, and as showed in the "Transcripts & Evals" (however something calls my attention it is classified as "Development", when I published twice or more selecting "Production" in the new feature of VF), why the agent could not be replying?
@Alex M are you available to hop into office hours from 10-11 AM ET today? We can troubleshoot live!
https://us02web.zoom.us/j/86704184237
Sorry, @KimLooo , I already had a scheduled meeting for the same time.
@KimLooo, see my addtl explanation in the "message.txt" file. Also, see the registers in the "Transcripts & Events" in the screenshot attached, which shows "Development" version instead of "Production".
BTW, I'm using Z-API, which calls a webhook in a scenery in Make, where VF is called with a text coming from WhatsApp. The VF module must returns the answer/message which is forwarded to the module of Z-API to deliver the message to Whatsapp unofficial. This process/scenery in Make was working before, so I guess the cause of the problem is in VF.
@KimLooo Hi, could you please let me know if you are already working on my issue, or if there’s a support channel I should contact? I’m in a bit of a hurry, since the challenge I’m facing with my company’s agent also affects a customer who is waiting for a solution. Thanks a lot for your help!
@KimLooo - seems that you worked on something, because now I got the answer from VF 🙂 Please, let me know what you did. Thanks!



@KimLooo - still listing a client that is not anymore in the "Settings.docx", and I already did everything that was recommended by Tico/VF, as, e.g. cleaned {vf_memory}, deleted the "Setttings.docx" file and wait 30+ hours to upload it to KB again. Seems that the cause of this problem is not in my side, but in the VF. Could you verify this issue?
It was already an issue when building another agent to a customer, because we editted some files we had used to feed the KB removing some information, as addresses, but the information deleted in the documents was kept in the KB. FYI, all them were Word files (docx),
Hi @Alex M are you able to email support@voiceflow.com - this way our team can pull your account info and troubleshoot
Sure, I'll do so.
