microsoft / microsoft/simplechat

Workspace search suppresses agent actions and fabricates spreadsheet values

Open
#1,332 0 comments 0 reactions 1 assignee View on GitHub

@paullizer is already working on this.

Since Aug 21, 2026.

bug
Dominant language
Python
Stars
152
Forks
116
Avg merge
7h 7m
Merged PRs (30d)
122

Description

Issue

Selecting an agent that has actions, enabling a workspace, and asking a specific quantitative question produces an answer that:

  1. never invokes any of the agent's actions, and
  2. reports numbers that are not present in the spreadsheet it cites.

The turn behaves as "retrieval or actions" rather than "retrieval and actions". Evidence gathering should be additive: gather everything the turn is capable of gathering, then reason over the union.

Reported case: a telemetry question against a workspace containing an Excel file. Workspace search returned a narrative document alongside the spreadsheet, and the assistant answered from retrieved text alone, presenting fabricated values as sourced fact.

Steps to Reproduce

  1. Select an agent that has one or more actions configured.
  2. Enable workspace document search (personal, group, or public) on a workspace containing both a narrative document and an .xlsx/.csv file.
  3. Ask a specific quantitative question about the spreadsheet's contents, phrased without words such as "calculate", "average", "total", or "how many" (for example, "What was the battery telemetry during the descent?").
  4. Observe the response and the thought trail.

Expected Behavior

The turn gathers all evidence it is capable of gathering — workspace retrieval and the agent's actions and real computation over the spreadsheet — then reasons over the combined result. Any value presented as fact is traceable to retrieved text, a computed tabular result, or an action result.

Actual Behavior

  • No agent action is invoked.
  • The tabular engine never runs, so the spreadsheet is never actually read.
  • The model answers from the indexed spreadsheet chunk, which contains only a truncated schema preview, and derives numbers from it.

Impact

Users are shown fabricated quantitative values attributed to a real, cited source document. This is a data-correctness and trust issue rather than a cosmetic one, because the answer looks properly grounded and cited. It affects any workspace containing spreadsheets alongside narrative documents.

Partial workaround: phrase questions using explicit tabular keywords ("calculate", "average", "how many"), which forces computation to run.

Root Cause

Three independent defects combine.

1. Tabular computation is suppressed by the presence of any narrative source. should_run_tabular_evidence() in functions_mixed_source_orchestration.py ended with a blanket if has_narrative_sources: return False. A single PDF in the relevance results suppressed computation over an authorized spreadsheet. The heuristic also treated topic words — report, policy, procedure, contract, agreement, memo, letter, narrative, prose — as evidence-type signals, so it misfired frequently.

Note that when enable_mixed_source_chat_search is disabled, the legacy path in route_backend_chats.py computes workspace tabular sources unconditionally. The mixed-source path had regressed that behavior.

2. Only a truncated preview of a spreadsheet is indexed. _build_tabular_schema_summary() in functions_documents.py indexes a single schema chunk holding at most TABULAR_SCHEMA_SUMMARY_MAX_PREVIEW_ROWS (3) rows per sheet. This is intentional, since the full file lives in blob storage and the tabular engine reads it directly. But when defect 1 skipped computation, that preview was still handed to the model as ordinary retrieved text, and the model derived totals and averages from three rows.

3. The retrieval augmentation prompt forbade using actions. build_search_augmentation_system_prompt() in route_backend_chats.py instructed the model to "base your answer only on information supported by the retrieved excerpts". The mixed-source evidence handoff was likewise a closed "synthesize one answer" instruction.

Agent actions were in fact available the whole time — agents are constructed with FunctionChoiceBehavior.Auto() in semantic_kernel_loader.py, and the agent is invoked with the augmented history. No code disables tools when documents are in scope. The model simply obeyed the instruction not to look anywhere else.

Notably, the indexed spreadsheet chunk ends with "This file is available for detailed analysis via the Tabular Processing plugin" — the model read the advertisement for the tool while being instructed not to use it.

Notes

Fixed in version 0.260.023. No new setting was introduced; these are correctness fixes applied unconditionally.

  • Inverted the tabular gate so an in-scope tabular source is computed unless the question unambiguously names a narrative artifact.
  • Narrowed narrative markers to artifact words only, so topic words no longer suppress computation.
  • Rewrote the skipped-source evidence summary to state that the full table was never read and that the tabular analysis action should be called if values are required.
  • Reframed the retrieval prompt so excerpts are starting evidence, directing the model to call an available action when they lack what the question needs. The no-fabrication rule is preserved and strengthened, and numeric conclusions from preview rows are explicitly forbidden.

Documentation: docs/explanation/fixes/AGENT_ACTIONS_WITH_WORKSPACE_EVIDENCE_FIX.md
Regression test: functional_tests/test_agent_actions_with_workspace_evidence.py

Related: #1021 (turn-level orchestration across chat capabilities) is the strategic solution to this class of problem — it calls for treating selected capabilities as required attempts and reporting skips or failures. This issue is the targeted correctness fix for the concrete symptom; it does not close #1021.

Follow-up discovered while fixing

functional_tests/test_mixed_source_chat_search_consistency.py, test_mixed_source_hardening.py, and test_mixed_source_analyze_workflow.py have seven pre-existing failures unrelated to this fix. Their harness builds a synthetic namespace for _execute_mixed_source_tabular_evidence that is missing maybe_queue_search_tabular_generated_output, so the stubbed tabular runner raises and every source reports failed. Worth a separate cleanup issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.