Alex M
Alex M3mo ago

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
Tico | Voiceflow Assistant
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:
Alex M
Alex MOP3mo ago
Thanks for your quick reply! My apologies, but I'm not finding the option you mentioned "replace the document in-place"
No description
Alex M
Alex MOP3mo ago
... 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.
No description
Alex M
Alex MOP3mo ago
@Tico | Voiceflow Assistant, could you show me where is the "Replace file", because I didn't find it in the KB UI?
Tico | Voiceflow Assistant
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 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-file
Hope that clarifies why you couldn’t find the button!
Alex M
Alex MOP3mo ago
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".
Tico | Voiceflow Assistant
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:
PUT https://api.voiceflow.com/v1/knowledge-base/docs/{documentID}/upload
PUT https://api.voiceflow.com/v1/knowledge-base/docs/{documentID}/upload
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-upload
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).
Voiceflow
Replace Document (url)
Replaces the document and document name in the Knowledge Base, by documentID (of type "url" only). Limit one per call.
Voiceflow
Delete Document
Deletes a specific Knowledge Base document by documentID.
Alex M
Alex MOP3mo ago
@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?
No description
No description
No description
No description
Tico | Voiceflow Assistant
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.
DELETE https://api.voiceflow.com/v1/knowledge-base/docs/{documentID}
Authorization: <your Dialog-Manager API-Key>
DELETE https://api.voiceflow.com/v1/knowledge-base/docs/{documentID}
Authorization: <your Dialog-Manager API-Key>
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.
You are Laura from Intrace, an AI agency.
Always introduce yourself exactly as "Laura from Intrace" – never use any other name.
You are Laura from Intrace, an AI agency.
Always introduce yourself exactly as "Laura from Intrace" – never use any other name.
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 👍
Voiceflow
Crafting great prompts
Learn how to build great prompts in Voiceflow.
Alex M
Alex MOP3mo ago
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.
Tico | Voiceflow Assistant
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 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 retesting
Even 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 temperatures
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
# verify deletion
auth=DM_API_KEY
curl -H"Authorization: $auth" https://api.voiceflow.com/v1/knowledge-base/docs | jq
# clear memory for the user session
curl -XDELETE -H"Authorization: $auth" \
https://api.voiceflow.com/v1/user-state/{userID}/memory
# verify deletion
auth=DM_API_KEY
curl -H"Authorization: $auth" https://api.voiceflow.com/v1/knowledge-base/docs | jq
# clear memory for the user session
curl -XDELETE -H"Authorization: $auth" \
https://api.voiceflow.com/v1/user-state/{userID}/memory
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.
Alex M
Alex MOP3mo ago
1. I did it right now. See the list of customers. I'll do the others recommended.
No description
Alex M
Alex MOP3mo ago
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.
No description
No description
Alex M
Alex MOP3mo ago
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
Alex M
Alex MOP3mo ago
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?
No description
KimLooo
KimLooo3mo ago
Hey Alex - have you completely republished your project? (not just resyncing the KB)
Alex M
Alex MOP3mo ago
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.
KimLooo
KimLooo3mo ago
kk lmk if the republish to the environment works! if not we can investigate with support
Alex M
Alex MOP3mo ago
@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).
No description
No description
No description
Screen of my WhatsApp
VF's screen with the list of events
We also see in VF that the messages from WhatsApp have been received, but not replied by the Agent.
Alex M
Alex MOP3mo ago
@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?
KimLooo
KimLooo3mo ago
@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
Zoom
Join our Cloud HD Video Meeting
Zoom is the leader in modern enterprise cloud communications.
Alex M
Alex MOP3mo ago
Sorry, @KimLooo , I already had a scheduled meeting for the same time.
Alex M
Alex MOP3mo ago
@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.
Alex M
Alex MOP3mo ago
@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!
Alex M
Alex MOP3mo ago
@KimLooo - seems that you worked on something, because now I got the answer from VF 🙂 Please, let me know what you did. Thanks!
No description
No description
No description
Alex M
Alex MOP3mo ago
@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),
KimLooo
KimLooo3mo ago
Hi @Alex M are you able to email support@voiceflow.com - this way our team can pull your account info and troubleshoot
Alex M
Alex MOP3mo ago
Sure, I'll do so.

Did you find this page helpful?