Skip to content

fix(deep-research): return results in ResearchNotes, not write_file - #286

Merged
cdgamarose-nv merged 1 commit into
NVIDIA-AI-Blueprints:developfrom
zhongxuanwang-nv:fix/research-sandbox-writefile-instructions
Jun 25, 2026
Merged

cdgamarose-nv merged 1 commit into
NVIDIA-AI-Blueprints:developfrom
zhongxuanwang-nv:fix/research-sandbox-writefile-instructions

Conversation

@zhongxuanwang-nv

@zhongxuanwang-nv zhongxuanwang-nv commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Fixes a contradicted instruction in the deep researcher's research/ sandbox skills.

The researcher worker is told via research.py (format_research_request):

"Do not call write_file or edit_file; run_research_batch will persist the returned
ResearchNotes under /shared/."

…and _persist_research_notes does exactly that automatically. But three skills
instructed the agent to persist artifacts to /shared via write_file —
data-table-analysis, lightweight-calculation, and forecast-analysis — i.e. an
instruction the researcher is explicitly told not to follow.

This reword changes each skill's persistence step to "include the result in your
returned ResearchNotes (e.g. a ResearchFinding's evidence / narrative_notes); do
not call write_file/edit_file."
The separate, still-correct rule that sandbox
code
uses /workspace and cannot touch /shared is unchanged.

The same conflict exists in two in-flight skills, fixed/flagged separately:
image-processing carries this fix in #285; chart-generation in #280 still needs it
(flagged to its author).

Validation

$ uv run pytest tests/aiq_agent/agents/deep_researcher/test_deepagents_runtime.py -q
18 passed

$ grep -rn "write_file" .../skills/research/   # now only "do not call write_file"
  • I ran the relevant local checks or explained why they are not applicable.
  • I added or updated tests for behavior changes. (N/A — wording-only in skill docs; discovery/content tests unaffected and pass.)
  • I updated documentation for user-facing or contributor-facing changes.
  • I confirmed this PR does not include secrets, credentials, or internal-only data.
  • I certify this contribution under the DCO and signed my commits with git commit -s.

Where should reviewers start?

research/data-table-analysis/SKILL.md (steps 5) vs tools/research.py:46
(format_research_request) — the reworded persistence step now matches what the
researcher is actually told to do.

Related Issues

Summary by CodeRabbit

  • Documentation
    • Updated research skill guidance so calculated outputs are returned directly in research notes for later synthesis.
    • Clarified that compact forecast and calculation results should be captured only after successful processing.
    • Removed instructions that required saving generated artifacts to shared file locations.

The researcher worker is instructed (research.py format_research_request): "Do not
call write_file or edit_file; run_research_batch will persist the returned
ResearchNotes under /shared/." But the research skills told the agent to persist
artifacts to /shared via write_file -- a contradicted instruction, since persistence
is automatic from the returned ResearchNotes.

Reword the persistence step in data-table-analysis, lightweight-calculation, and
forecast-analysis to: include the result in your returned ResearchNotes (e.g. a
ResearchFinding's evidence / narrative_notes); do not call write_file/edit_file. The
separate, correct rule that sandbox code uses /workspace and cannot touch /shared is
unchanged.

(image-processing carries the same fix in PR NVIDIA-AI-Blueprints#285; chart-generation in PR NVIDIA-AI-Blueprints#280 needs
it too -- flagged to its author.)

Validation: uv run pytest
tests/aiq_agent/agents/deep_researcher/test_deepagents_runtime.py (18 passed); grep
confirms write_file now appears only as "do not call write_file".

Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

Walkthrough

The research skill docs now direct computed outputs and compact inputs to ResearchNotes instead of /shared files. The updates cover data-table analysis, forecast analysis, and lightweight calculation instructions.

Changes

Research output contract updates

Layer / File(s) Summary
Data-table analysis output contract
src/aiq_agent/agents/deep_researcher/skills/research/data-table-analysis/SKILL.md
The required execution standard, final output flow, and output formats now place markdown/CSV/JSON results in ResearchNotes and remove /shared file-writing guidance.
Forecast and calculation output contract
src/aiq_agent/agents/deep_researcher/skills/research/forecast-analysis/SKILL.md, src/aiq_agent/agents/deep_researcher/skills/research/lightweight-calculation/SKILL.md
Forecast inputs and calculation results are now returned in ResearchNotes, with execution steps updated to do so after successful calculations and without /shared artifact writes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Tools execution failed with the following error:

Failed to run tools: Ping-pong health check failed


Comment @coderabbitai help to get the list of available commands.

@zhongxuanwang-nv zhongxuanwang-nv changed the title fix(deep-research): research skills return ResearchNotes, not write_file fix(deep-research): return results in ResearchNotes, not write_file Jun 25, 2026
@zhongxuanwang-nv
zhongxuanwang-nv marked this pull request as ready for review June 25, 2026 01:38

@cdgamarose-nv cdgamarose-nv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you!

@cdgamarose-nv

Copy link
Copy Markdown
Collaborator

/ok to test 289319e

@cdgamarose-nv
cdgamarose-nv merged commit 766d5a6 into NVIDIA-AI-Blueprints:develop Jun 25, 2026
10 checks passed
@AjayThorve AjayThorve added this to the v2.2 milestone Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants