How dualsynapse/jdih-bp2mi-qdrant-rag works
This repository ingests Indonesian legal documents into tiered Qdrant collections. Its main workflow loads and filters category metadata, fetches each PDF, converts and chunks its text, builds contextual content, then embeds and upserts points. The graph also shows hierarchy classification and collection routing as separate domain stages. Edges reflect calls visible in the excerpts or workflow explicitly documented in the README; the sampled source does not show a separate runtime consumer for the stored vectors.
Main entry points: main.py Pipeline orchestrator · upserter.py Batch upserter · config.py Pipeline configuration · loader.py Metadata loader
Components 14
Ingestion control
- Pipeline configuration
rag_ingestion/config.py - Pipeline orchestrator
rag_ingestion/main.py - Metadata loader
rag_ingestion/pipeline/loader.py
Document processing
- PDF fetcher
rag_ingestion/pipeline/fetcher.py - PDF converter
rag_ingestion/pipeline/converter.py - Article chunker
rag_ingestion/pipeline/chunker.py - Context builder
rag_ingestion/pipeline/context_builder.py
Legal classification
- Authority hierarchy
rag_ingestion/utils/hierarchy.py - Collection router
rag_ingestion/utils/collection_router.py
Embedding and storage
- Local embedder
rag_ingestion/pipeline/embedder.py - Batch upserter
rag_ingestion/pipeline/upserter.py - Qdrant collections
Other components
- Pipeline operator
- Category metadata
Connections 17
- Pipeline operator → Pipeline orchestrator: runs pipeline
README.md - Category metadata → Metadata loader: provides JSON
README.md - Pipeline orchestrator → Metadata loader: loads documents
rag_ingestion/main.py - Metadata loader → Pipeline configuration: reads limits
rag_ingestion/pipeline/loader.py - Pipeline orchestrator → Authority hierarchy: classifies category
rag_ingestion/main.py - Pipeline orchestrator → PDF fetcher: fetches PDF
rag_ingestion/main.py - PDF fetcher → Pipeline configuration: reads timeout
rag_ingestion/pipeline/fetcher.py - Pipeline orchestrator → PDF converter: converts PDF
rag_ingestion/main.py - Pipeline orchestrator → Article chunker: chunks Markdown
rag_ingestion/main.py - Pipeline orchestrator → Context builder: builds content
rag_ingestion/main.py - Pipeline orchestrator → Batch upserter: submits chunks
rag_ingestion/main.py - Batch upserter → Local embedder: embeds content
rag_ingestion/pipeline/upserter.py - Local embedder → Pipeline configuration: reads model
rag_ingestion/pipeline/embedder.py - Batch upserter → Collection router: selects collection
rag_ingestion/pipeline/upserter.py - Batch upserter → Qdrant collections: upserts points
rag_ingestion/pipeline/upserter.py - Batch upserter → Pipeline configuration: reads credentials and collections
rag_ingestion/pipeline/upserter.py - Collection router → Pipeline configuration: reads collection names
rag_ingestion/utils/collection_router.py