Implement LLM-Based Re-Ranking for Evidence Retrieval#39
Merged
RonaldRonnie merged 4 commits intomainfrom Dec 24, 2025
Merged
Conversation
- Add Pydantic-based settings schema with validation - Implement settings loading from file, env, and CLI - Add preset configurations (fast, balanced, high_quality, development, production) - Add settings CLI commands (view, save, load, preset, migrate) - Support settings inheritance from base files - Add settings migration system - Create comprehensive settings documentation All acceptance criteria from issue #11 have been met.
- Create comprehensive RAG Guide (docs/RAG_GUIDE.md) - Update README with enhanced RAG features section - Add RAG architecture documentation - Add configuration guide with examples - Create usage examples (Python, REST API, CLI) - Add comprehensive API documentation - Create migration guide (v1 to v2) - Add troubleshooting guide - Update CLI documentation with RAG features All acceptance criteria from issue #13 have been met.
- Unit tests for contextual summarization (test_contextual_summarization.py) - Unit tests for re-ranking (test_chunk_reranking.py) - Integration tests for RAG pipeline (test_advanced_rag.py) - Tests for embedding generation (test_vector_store.py) - Tests for vector store operations (test_vector_store.py) - Performance benchmarks (test_rag_performance.py) - Accuracy benchmarks (test_rag_accuracy.py) - Fix syntax error in unified_qa.py All acceptance criteria from issue #12 have been met. Test coverage includes: - Unit tests with mocks for all RAG components - Integration tests for complete RAG pipeline - Performance benchmarks for speed optimization - Accuracy benchmarks for quality validation - Vector store and embedding tests Tests use pytest with async support and comprehensive mocking.
- Change relevance scoring to 0-10 scale (from 0-1.0) - Add evidence_k parameter for configurable evidence retrieval - Add max_sources parameter to limit final answer sources - Add performance metrics tracking for re-ranking - Update prompt templates for 0-10 scale with detailed guidelines - Integrate evidence_k and max_sources with field extraction - Update API models and endpoints to support new parameters - Add get_metrics() and get_rerank_metrics() methods All acceptance criteria met: ✓ Evidence retrieval with embedding search ✓ LLM-based re-ranking step ✓ Re-ranking prompt templates (0-10 scale) ✓ Relevance scoring (0-10 scale) ✓ Configurable evidence_k parameter ✓ max_sources parameter for final answer ✓ Integration with field extraction ✓ Performance metrics for re-ranking
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.
All acceptance criteria met:
✓ Evidence retrieval with embedding search
✓ LLM-based re-ranking step
✓ Re-ranking prompt templates (0-10 scale)
✓ Relevance scoring (0-10 scale)
✓ Configurable evidence_k parameter
✓ max_sources parameter for final answer
✓ Integration with field extraction
✓ Performance metrics for re-ranking
Closes #10