fix: Diagnose and fix RAG system query failures#160
Open
sjsh-jason wants to merge 4 commits intohttps-deeplearning-ai:mainfrom
Open
fix: Diagnose and fix RAG system query failures#160sjsh-jason wants to merge 4 commits intohttps-deeplearning-ai:mainfrom
sjsh-jason wants to merge 4 commits intohttps-deeplearning-ai:mainfrom
Conversation
- Fixed empty vector store issue by auto-loading courses on startup - Added comprehensive diagnostic tests and reports - Improved error handling and logging - Added test suite for RAG components Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Add language detection to identify Chinese vs English queries - Store language preference per session for consistency - Add Chinese system prompt for Claude API - Automatically respond in the detected language Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
… selection Implement frontend language selector button in top-left corner with Chinese/English toggle. Add i18n.js with complete translations for all UI elements. Update backend API to support user-selected language preference with priority: user selection > session language > auto-detection. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
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
Changes
backend/app.pyto auto-load course documents during startupDIAGNOSTIC_REPORT.mdandFINAL_DIAGNOSTIC_SUMMARY.mdbackend/tests/with:test_search_tools.py- Tests for CourseSearchTooltest_ai_generator.py- Tests for AIGeneratortest_rag_system.py- Tests for RAGSystemrun_diagnostics.py- Integration diagnostic scripttest_query_flow.py- Query flow analysisTest plan
/api/coursesendpoint returns course list/api/queryendpoint returns responsesRoot Cause Analysis
The "query failed" error was caused by an empty vector store. The
startup_event()function was skipping document loading, so no course data was available for the search tool to find.🤖 Generated with Claude Code