Bot doesn’t remember context within the same conversation

Deville Quist 0 Reputation points
2026-11-30T20:07:58.8966667+00:00

I asked the Teams bot to summarize a document, then followed up with a question about one specific section. Even though it was in the same chat and only a few moments later, the bot asked me to upload the document again. I expected it to remember the document and our previous conversation. Is that expected behavior?

Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs

0 comments No comments

2 answers

Sort by: Most helpful
  1. Aetherin 5,080 Reputation points Independent Advisor
    2026-11-30T20:38:46.57+00:00

    Hi @Deville Quist,

    This behavior may be expected depending on how the bot was designed. A custom Teams bot does not automatically retain the uploaded document or the previous conversation context between messages. The developer needs to explicitly store the conversation state and document reference, then retrieve that information when processing follow-up questions.

    For production environments, the bot should use persistent shared storage rather than in-memory storage, as in-memory state can be lost when the bot restarts or when another instance handles the next message. The bot may also need to retain the file reference in OneDrive or SharePoint and retrieve the relevant content again when responding. Please see:

    Could you confirm whether this is a custom bot developed by your organization or a Microsoft/third-party bot? If it is a custom bot, the developer should review its conversation-state storage, file-reference handling, and how previous context is included in each AI request.

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-11-30T20:08:12.4966667+00:00

    Yes. That can be expected behavior.

    Bots are inherently stateless, so they don’t automatically retain prior turn data unless the bot is designed to persist and return that context. In this scenario, the bot likely used the document to answer the first request, but didn’t keep the full fetched result in active context for the follow-up.

    Two documented causes match this behavior:

    1. Partial return of fetched data: if the bot or topic retrieved the full document content, used only part of it to produce the summary, and returned only that summary, later questions about a specific section can’t be answered from context. The system then refetches the data or asks for it again.
    2. Context loss in conversation: even within a longer session, values can fall out of active context, causing the bot to ask again for information it had earlier.

    To avoid this, the bot needs to be designed to:

    1. Return the whole fetched result, not just the immediate answer, so later turns can reuse other parts of the document.
    2. Persist needed values in state or memory for follow-up turns and longer conversations.

    For Bot Framework bots, state management is the mechanism used to track conversation context and remember previous answers. For Copilot Studio agents, memory and context rehydration are the relevant mechanisms.

    So the behavior is not surprising by default; remembering the document across follow-up questions requires explicit state, memory, or context-handling design in the bot.


    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.