Retriever
Unified retrieval module for RAG system with support for multiple vector databases.
Features
- Multiple vector database backends: Qdrant, ChromaDB, Milvus
- Filename search: Separate collection for efficient filename-based search
- Context enrichment: Fetch neighboring chunks for better context
- Category filtering: Filter results by accessible categories
- Unified interface: Single API for all vector stores
Installation
poetry add donkit-retriever
Usage
Basic Setup
from donkit.retriever import create_vectorstore_service, RetrievalConfig
from langchain.embeddings import OpenAIEmbeddings
# Configure retrieval options
config = RetrievalConfig(
vector_database="qdrant",
retriever_options={
"filename_search": True,
"partial_search": True,
"max_retrieved_docs": 10,
}
)
# Create service
embeddings = OpenAIEmbeddings()
service = create_vectorstore_service(
db_type="qdrant",
embeddings=embeddings,
config=config,
collection_name="my_collection",
database_uri="http://localhost:6333",
)
# Search documents
documents = await service.search_documents(
query="What is RAG?",
k=5
)
Supported Vector Databases
Qdrant
service = create_vectorstore_service(
db_type="qdrant",
embeddings=embeddings,
config=config,
database_uri="http://localhost:6333",
)
ChromaDB
service = create_vectorstore_service(
db_type="chroma",
embeddings=embeddings,
config=config,
database_uri="http://localhost:8000",
)
Milvus
service = create_vectorstore_service(
db_type="milvus",
embeddings=embeddings,
config=config,
database_uri="http://localhost:19530",
)
Configuration Options
from donkit.retriever import RetrievalConfig, RetrieverOptions
config = RetrievalConfig(
vector_database="qdrant", # qdrant | chroma | milvus
retriever_options=RetrieverOptions(
filename_search=True, # Enable filename-based search
partial_search=True, # Fetch neighboring chunks
max_retrieved_docs=10, # Max documents to retrieve
),
ranker="http://ranker-service:8000", # Optional reranker URL
)
Architecture
VectorstoreModule
Each database has its own module implementing VectorstoreModuleAbstract:
QdrantVectorstoreModuleChromaVectorstoreModuleMilvusVectorstoreModule
VectorstoreService
Orchestrates search operations:
- Filename search (if enabled)
- Vector search
- Neighbor fetching (if partial_search enabled)
- Document combination and deduplication
Development
# Install dependencies
poetry install
# Run tests
poetry run pytest
# Run linter
poetry run ruff check .
License
Proprietary
Metadata
Release files for donkit-retriever 0.1.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| donkit_retriever-0.1.13.tar.gz | 13.7 kB | Without provenance | Details for donkit_retriever-0.1.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| donkit_retriever-0.1.13-py3-none-any.whl | Python 3 | none | any | Details for donkit_retriever-0.1.13-py3-none-any.whl |
Total release size: 32.7 kB
Release files / donkit_retriever-0.1.13.tar.gz
| Download URL | donkit_retriever-0.1.13.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
268cedff318c9df5dcbb2c1adf281dfa17123465258067879593e50807cb0c4d
|
|
BLAKE2b-256 checksum How to use checksums |
e7151b1429f26ec152cc86877b2b1f9330c6f8732931b071897ebf3dd5c73c20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.13.1 Darwin/25.3.0
|
Release files / donkit_retriever-0.1.13-py3-none-any.whl
| Download URL | donkit_retriever-0.1.13-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
922babcab2b29092293f31df4d321015f672d1cf5495fe90ca29c70effcc7389
|
|
BLAKE2b-256 checksum How to use checksums |
790dc8b4b22ce35b7a3f2411f74e103603d4a7bf9bba66ec58fb465855df1659
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.13.1 Darwin/25.3.0
|
Security for donkit-retriever 0.1.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.