Skip to content

fix: correct summarizer typos and wire dead web search fallback route - #157

Closed
bhavyakeerthi3 wants to merge 3 commits into
reactome:mainfrom
bhavyakeerthi3:fix/prompt-typos-and-numbering
Closed

fix: correct summarizer typos and wire dead web search fallback route#157
bhavyakeerthi3 wants to merge 3 commits into
reactome:mainfrom
bhavyakeerthi3:fix/prompt-typos-and-numbering

Conversation

@bhavyakeerthi3

Copy link
Copy Markdown

🐛Summary

Surgical hardening of the CrossDatabase agent: fixes pre-existing typos in the summarization prompt and resolves a silent "dead route" where web search decisions were never executed.

Changes

1. Prompt Improvements & Typo Fixes

src/agent/tasks/cross_database/summarize_reactome_uniprot.py

  • Corrected typos in the expert curator system prompt (ADNand, infromationinformation)
  • Fixed broken numbering sequence in the instruction list
  • Updated prompt to support and prioritize external web search results when Reactome/UniProt data is insufficient

2. Wiring the Web Search Fallback

src/agent/profiles/cross_database.py

The Issue:
The perform_web_search route was hardcoded to point directly to generate_final_response — the agent would decide to search but skip execution entirely, producing incomplete responses.

The Fix:

  • Added web_search_results to CrossDatabaseState
  • Implemented perform_web_search node using the existing search_workflow
  • Updated graph routing: assess_completenessperform_web_searchgenerate_final_response

Impact

  • Eliminates typos visible in final LLM responses
  • Web search fallback now actually executes instead of being silently skipped
  • Queries outside RAG coverage return real results instead of "I don't know"

Verification

  • CrossDatabaseState correctly holds web_search_results
  • Graph transition confirmed: assess_completenessperform_web_searchgenerate_final_response
  • tests/test_config.py passing

Fixes #123

Fixed multiple typos ('adn' -> 'and', 'infromation' -> 'information',
'retining' -> 'retaining', 'drived' -> 'derived') and corrected the
broken numbering sequence in the expert curator system prompt.

Clean and professional prompts improve the LLM's adherence to
instructions and overall response quality.
adamjohnwright added a commit that referenced this pull request Sep 4, 2026
Typos and numbering in the summarizer prompt, from #157.
@adamjohnwright

Copy link
Copy Markdown
Contributor

Thank you — both halves of this were real, and verified against current main.

Taken: the prompt typos, merged in #175. adn, infromation (twice), retining, drived (twice), plus key biological terms terminology. The numbering was worse than reported — the list ran 1,2,3,4,5 then 4 again, then 5,6,6, so three of nine items shared a number. Renumbered 1–9.

Confirmed but not taken yet: the dead perform_web_search route. It is real — cross_database.py maps that decision straight to generate_final_response, so the agent decides to search and then does not. @bhavyakeerthi3 in #123 found the same thing independently, which is what made it credible.

Not fixed now because it sits in the Cross-Database Prototype profile, which config_default.yml does not enable, so no user is affected today. It should be fixed before that profile is revived, and your diagnosis is the record of it.

Closing as partially harvested rather than stale.

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.

2 participants