Usage documentation not yet indexed for this tool.
Technical Documentation
VFS Recovering Reference...
RAG Knowledge Base
A private document RAG (Retrieval-Augmented Generation) system that ingests PDFs and exposes a search tool via an MCP server. Retrieval combines vector search (pgvector) and BM25 keyword search with cross-encoder reranking, and answers are generated by an AWS Bedrock LLM.
Architecture
mermaid
flowchart LR
subgraph Ingestion
direction TB
A[๐ data/ PDFs] --> B[Docling PDF Parser]
B --> C[HybridChunker BAAI/bge-m3 tokenizer]
C --> D[HuggingFace Embeddings BAAI/bge-m3 ยท 1024-dim]
D --> E[(pgvector PostgreSQL)]
C --> F[(Redis BM25 Docstore)]
end
subgraph Query["Query โ mcp_server.py"]
direction TB
G[search_knowledge tool call] --> H[Vector Retriever pgvector]
G --> I[BM25 Retriever Redis]
H & I --> J[QueryFusionRetriever relative_score fusion]
J --> K[Cross-encoder Reranker BAAI/bge-reranker-large]
K --> L[BedrockConverse LLM]
L --> M[Answer + Sources]
end
E --> H
F --> I
ingestion/config.py is the source of truth for supported environment variables and defaults. Copy .env.example to .env and update credentials/endpoints for your environment.