I created an Agent and provided an instruction to read data in a csv file and summarize it. Sometime, it fails badly

Edward 86 Reputation points
2026-07-16T19:21:18.08+00:00

For testing, we would literally use the same exact csv file.

Sometimes, it'd actually do the job. Sometimes, it would fail and/or state that there is no customer information found even though it literally does.

Even when it does, it cannot remember anything about it. I would ask a follow-up question but it's just completely clueless.

Explain please?

Thank you. Copilot Studio

Microsoft Copilot | Microsoft 365 Copilot | Development
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-07-16T19:22:09.9533333+00:00

    This behavior is consistent with how Copilot Studio knowledge retrieval works.

    A Copilot Studio agent does not read a CSV file end-to-end on every turn. It retrieves matching excerpts or chunks from the knowledge source. Because retrieval is chunk-based, the same file can produce inconsistent results across runs if the relevant content is not retrieved well for that prompt. That also explains why the agent can sometimes say no customer information was found even when the CSV contains it.

    Key reasons this happens:

    1. Chunk-based retrieval, not full-file reading The knowledge experience returns excerpts/chunks, not the entire file. If the needed rows or fields are not in the retrieved chunk, the answer can be incomplete or wrong.
    2. Large or poorly structured files reduce retrieval quality Large files, huge tables, and data that depends on surrounding rows can retrieve poorly. Guidance in similar cases recommends splitting large files into smaller, self-contained sections and avoiding huge tables where possible.
    3. Follow-up questions can fail if grounding is enforced too strictly Copilot Studio follow-up questions depend on grounded responses. If Allow ungrounded responses is disabled, clarifying or follow-up behavior can be suppressed, and the agent can fall back to a generic failure pattern instead of carrying the conversation forward.
    4. Instructions cannot force capabilities the agent does not have Telling the agent to “read the CSV and remember it” does not make it ingest the whole file into persistent conversational memory. Instructions only guide how the agent uses configured tools and knowledge sources.
    5. If the agent is not published, only a limited extract might be processed In a reported Copilot Studio case, an unpublished agent only processed a limited extract of the data.

    What to do:

    1. Restructure the data source
      • Split the CSV into smaller, self-contained datasets.
      • Keep each section focused on a single topic or customer grouping.
      • Avoid very large flat tables when possible.
    2. Add stronger structure around the data If the source is being converted or stored as markdown or text, use clear headings and restate context in each section. This improves retrieval because chunks are retrieved independently.
    3. Do not rely on the knowledge source for exact full-dataset recall If the requirement is to return complete customer data reliably every time, use a Power Automate flow, custom connector, or HTTP action to fetch the full payload instead of relying only on Knowledge retrieval.
    4. Check whether the agent is published If testing is being done on an unpublished agent, publish it and retest.
    5. Review the actual session transcript and evaluation setup Compare the agent’s actual response with the expected result. If the response varies, inspect transcripts to see whether the agent retrieved the wrong content, omitted critical information, or failed to ground the answer.
    6. Diagnose whether this is retrieval, instruction, or source-content failure Use this triage:
      • Wrong source retrieved → knowledge source configuration issue.
      • Right source, wrong extraction → instruction gap.
      • Source content outdated or unclear → source content issue.
      • Answer made up without grounding → source accessibility or query phrasing issue.

    For the follow-up question problem specifically: the agent is not “remembering the CSV” as a full dataset. It is answering based on what was retrieved for the current turn. If the next question does not retrieve the same relevant chunk, the answer can appear clueless.


    References:

    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.