Share via

Context Persistence in Chat Bot Index After Deleting Documents from Storage

Dewwrat 0 Reputation points
2024-02-14T02:55:02.0766667+00:00

I am currently in the process of developing a chat bot using the Azure OpenAI models(& Azure Web App), specifically leveraging my own data as the source for these models[Reference: Azure OpenAI on your data]. The data source in question is a storage account where I intend to store PDF documents containing anomalies from system & business metrics. My objective with this chat bot is to have it provide responses based on the most recent anomaly report stored in the Blob storage, with a regular update mechanism in place where newer anomaly files replace older ones. To achieve this, I plan to add the Blob storage account as a data source for the OpenAI models and then regularly update the stored PDF documents by deleting the older anomaly reports and adding the new ones. However, before proceeding, I need clarification on how the deletion of documents impacts the chat bot's index and its ability to retain context from previously deleted documents. My specific questions are as follows:

  1. After deleting a document from the storage that has been previously indexed by the chat bot, will the chat bot's index retain any context or information from the deleted document?
  2. Is there a mechanism to ensure that the chat bot only uses the latest uploaded document for its responses, completely disregarding any data from the documents that have been removed?
  3. If the index retains context from deleted documents, what steps can I take to ensure that the chat bot's responses are solely based on the most current anomaly report?

The desired outcome is for the chat bot to always answer queries using only the latest anomaly report, without being influenced by previously indexed but now deleted documents. This is crucial for the accuracy and relevance of the chat bot's responses, as it will be used to provide insights into the most current anomalies affecting our metrics.

Azure OpenAI Service
Azure OpenAI Service

An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Adharsh Santhanam 8,210 Reputation points Microsoft Employee Volunteer Moderator
    2024-02-14T05:23:16.84+00:00

    Hello @Dewwrat Let me help answering your queries.

    1. When a document is deleted from storage, the chatbot's index does NOT retain any context or information from the deleted document. Each query to the bot is treated as a standalone prompt, unrelated to the previous queries. The model doesn't inherently remember past interactions. Therefore, if you delete a document, the chatbot won't retain any context related to that document in subsequent responses.
    2. Whenever you delete a document, make sure to remove it from the index promptly. Similarly, when you upload a new document, update the index to include the latest content. This will ensure that the bot gives you content based on the latest available index information.
    3. As called out above, once you delete documents, make sure to remove it from the index. This will ensure that the bot only responds based on the latest available information.

    If the Answer is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.