fix: multi-language support and web search citations (#104)#125
Open
bhavyakeerthi3 wants to merge 3 commits intoreactome:mainfrom
Open
fix: multi-language support and web search citations (#104)#125bhavyakeerthi3 wants to merge 3 commits intoreactome:mainfrom
bhavyakeerthi3 wants to merge 3 commits intoreactome:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌟 Summary
This PR addresses Issue #104 ("RAG only responds in English") and completes the integration of external web search results. It enables the chatbot to act as a globally accessible research assistant by handling cross-lingual queries with high scientific precision.
Key Improvement: Multi-Language Support (#104)
The Problem: The agent was hardcoded to English in rephrasing steps and often failed to deliver the final response in the user's native language, even when correctly detected.
The Solution:
summarize_reactome_uniprotsystem prompt to strictly prioritize the{detected_language}for the final response.Key Improvement: Web Search Integration
The Problem: While the graph logic for the Tavily fallback was fixed previously, the search results were not being piped to the final summarizer node.
The Solution:
web_resultsto the summarization chain.Files Modified
web_resultsdata flow to the final nodeVerification
Verified the logic flow of the LangGraph. The agent now successfully handles the lifecycle: Multi-lingual Input → Precision English Search → Multi-DB Research → Native Language Summary with Citations.