Refactor imports and enhance RAG pipeline - #2
Merged
Conversation
…les, update ruff for changes
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.
This pull request introduces several significant enhancements and refactors to the RAG system, focusing on improved document chunking, retrieval, and verification workflows. The main changes include a complete overhaul of the
DoclingClientto support asynchronous chunking and polling, updates to the Qdrant vector store integration for hybrid dense/sparse retrieval, and the introduction of a verification prompt and structured output support for LLM completions. Configuration files and data models have also been updated to support these new features and provide greater flexibility.Docling and Chunking Improvements:
DoclingClientto use asynchronous document submission, status polling, and result fetching, with support for timeouts, polling intervals, and conversion/chunking options. The client now handles task submission, polling, and result retrieval in separate methods, providing robust error handling and deadline management. (rag/src/clients/docling.py)config.yaml,rag/src/models/config.py,rag/src/models/__init__.py) [1] [2] [3]Hybrid Dense/Sparse Retrieval with Qdrant:
rag/src/clients/qdrant.py,config.yaml) [1] [2] [3]LLM Client Enhancements:
rag/src/clients/llm.py) [1] [2] [3]Verification Workflow:
prompts.yaml,rag/src/models/__init__.py) [1] [2]Configuration and Import Refactoring:
src, improving module clarity and maintainability. (rag/src/clients/embedder.py,rag/src/clients/reranker.py,rag/src/clients/webhook.py,rag/src/config.py,rag/src/clients/qdrant.py, etc.) [1] [2] [3] [4] [5] [6]Configuration Enhancements:
config.yaml) [1] [2]These changes collectively modernize the RAG pipeline, enabling more accurate and robust document processing, retrieval, and answer validation.
Docling and Chunking Enhancements
DoclingClientfor async document submission, polling, and result fetching with deadline and error management.Hybrid Retrieval and Qdrant Integration
LLM and Verification
Configuration and Imports
srcpaths for clarity and maintainability. [1] [2] [3] [4] [5] [6]