Workspace search suppresses agent actions and fabricates spreadsheet values
Los mantenedores suelen responder en 1 día
@paullizer ya está trabajando en esto.
Desde el 21/8/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Issue
Selecting an agent that has actions, enabling a workspace, and asking a specific quantitative question produces an answer that:
- never invokes any of the agent's actions, and
- 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
- Select an agent that has one or more actions configured.
- Enable workspace document search (personal, group, or public) on a workspace containing both a narrative document and an
.xlsx/.csvfile. - 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?").
- 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.
- Lenguaje dominante
- Python
- Estrellas
- 157
- Forks
- 117
- Merge medio
- 3 h 31 min
- PR fusionados (30 d)
- 226
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/simplechat
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/simplechat#1491 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/simplechat#1370 ·
Los mantenedores suelen responder en 1 día
-
Add conversation references and queued AI handoffs across chat, orchestration, and workflowsPosiblemente ocupada @paullizer la tomó hace 2 días. AbiertoCreated By Copilot enhancement P2
microsoft/simplechat#1835 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Stale activeGroupOid after group removal interrupts chat in legacy and React V2Posiblemente ocupada @paullizer la tomó hace 4 días. Abiertobug P1
microsoft/simplechat#1816 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Simple Chat - NLRAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
microsoft/simplechat#1804 ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/simplechat
Issues similares
-
bug P2 rust
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
jscott3201/rusty-bacnet#2085 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
evarness-ai/iris-harness#401 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
sistemicorp/scripts#62 ·
-
area/mac help wanted needs-qa
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100