fix: multi-language support and web search citations (#104) - #125
fix: multi-language support and web search citations (#104)#125bhavyakeerthi3 wants to merge 3 commits into
Conversation
|
Thank you @bhavyakeerthi3 — and sorry for the long wait. The language half of this is implemented in #205, and it uses your mechanism. You put the language in as a prompt variable, where You also kept the translate-to-English step in the rephrase prompt while rewriting it. That was the obvious thing to get wrong — the corpus is English, so retrieving in the user's language costs real quality — and you did not get it wrong. What #205 does differentlyIt applies the same idea to React-to-Me and Plant Reactome, which were the profiles with the gap. Cross-Database, which your PR improved, was already the one that worked. What is not resolved, and is not being dismissedThis PR also adds a hallucination grader and web-search wiring to Cross-Database. #205 does not touch either, and closing this must not be read as a decision about them — they overlap #123 and deserve judging on their own merits rather than riding in on a language fix. If you would like that work considered, #123 is where it belongs, and the grader idea in particular is worth having: nothing currently checks whether an answer is supported by what was retrieved. The reasoning is in |
🌟 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.