Skip to content

fix graph insights ignored when partial neo4j results - #16

Merged
Thierry Damiba (thierrypdamiba) merged 1 commit into
mainfrom
fix/graph-insights-prompt
Mar 3, 2026
Merged

Thierry Damiba (thierrypdamiba) merged 1 commit into
mainfrom
fix/graph-insights-prompt

Conversation

@thierrypdamiba

Copy link
Copy Markdown

Summary

  • The fusion summary prompt told the LLM to skip Graph Insights if Neo4j returned "no useful results", but it was skipping even when get_related_papers_by_mesh returned 10 results because get_collaborators_with_topics returned 0
  • Updated prompt to explicitly list what to look for in each Neo4j tool result (related papers, collaborators, gene co-occurrence)
  • Changed instruction to only skip Graph Insights when ALL Neo4j tools return empty
  • Filter out empty tool results before passing to the summarizer so the LLM focuses on actual data

Test plan

  • Query "BRCA1 breast cancer" and verify Graph Insights section now includes related papers by MeSH
  • Query "p53 apoptosis" still shows collaborator networks
  • Query with genuinely no graph results still omits Graph Insights

@thierrypdamiba
Thierry Damiba (thierrypdamiba) merged commit 74b9d2e into main Mar 3, 2026
1 check passed
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.

1 participant