How kumar306/discovery-engine works
Search-platform is a design-phase product for ESCI product search: documents enter through an ingestion API, are stored and tracked, then events drive chunking, embedding, and index updates. The README also describes hybrid retrieval, learned ranking, a cited RAG shopping assistant, evaluation, and Spark analytics, but the query and RAG packages have no implementation files in this tree. The graph includes those documented capabilities without inventing their internal wiring; shown source relationships are limited to the supplied excerpts and SOURCE INDEX.
Main entry points: pipeline.py Chunk pipeline · storage.py S3 document store · service.py Ingest service · app.py Ingest API
Components 25
Document ingestion
- Ingest API
services/ingest/app.py - Ingest service
services/ingest/service.py - Document repository
services/ingest/repository.py - S3 document store
services/ingest/storage.py - Outbox relay
services/ingest/relay.py
Indexing pipeline
- Embedding worker
services/embed/worker.py - Event consumer
services/embed/consumer.py - Chunk pipeline
services/embed/pipeline.py - Text embedder
services/embed/embedder.py - Chunk repository
services/embed/repository.py - Qdrant index
services/embed/qdrant.py
Shared foundations
- Document schemas and hashing
libs/schemas/documents.py - Retry policies
libs/resilience/retry.py - Service settings
libs/settings.py
Search and assistant
- Hybrid retrieval
services/query - Learned ranking
services/query - Cited RAG assistant
services/rag
Analytics and evaluation
- Spark analytics
analytics - ESCI dataset selection
eval/dataset.py - Retrieval metrics
eval/metrics.py
Other components
- Document client
- Event broker
- Postgres
- S3 storage
- Qdrant store
Connections 26
- Document client → Ingest API: submits documents
services/ingest/app.py - Ingest API → Ingest service: invokes service
services/ingest/app.py - Ingest service → Document repository: accepts and checks
services/ingest/service.py - Ingest service → S3 document store: stores documents
services/ingest/service.py - Ingest service → Outbox relay: writes event records
- Outbox relay → Event broker: publishes events
- Document repository → Postgres: reads and writes
services/ingest/repository.py - S3 document store → S3 storage: reads and writes
services/ingest/storage.py - Embedding worker → Event consumer: runs consumer
services/embed/worker.py - Event broker → Event consumer: delivers events
- Event consumer → Chunk pipeline: processes events
services/embed/consumer.py - Chunk pipeline → S3 document store: reads source documents
services/embed/pipeline.py - Chunk pipeline → Text embedder: creates embeddings
services/embed/pipeline.py - Chunk pipeline → Chunk repository: stages and commits
services/embed/pipeline.py - Chunk pipeline → Qdrant index: stages vector points
services/embed/pipeline.py - Chunk repository → Postgres: reads and writes
services/embed/repository.py - Qdrant index → Qdrant store: updates index
- Chunk pipeline → Document schemas and hashing: validates and hashes
services/embed/pipeline.py - S3 document store → Retry policies: retries storage calls
services/ingest/storage.py - S3 document store → Service settings: uses shared settings
services/ingest/storage.py - Ingest API → Document schemas and hashing: uses document models
services/ingest/app.py - Hybrid retrieval → Qdrant store: retrieves candidates
- Hybrid retrieval → Learned ranking: ranks results
- Cited RAG assistant → Hybrid retrieval: uses retrieval
- Spark analytics → ESCI dataset selection: analyzes product data
- ESCI dataset selection → Retrieval metrics: supports evaluation