The pipeline
An upload is stored in S3-compatible storage and recorded as a pending document, then queued. A Celery worker extracts text (PyMuPDF, with a Tesseract OCR fallback for scans), makes a thumbnail and computes embeddings, updating the status as it goes. The browser sees each step live over a WebSocket.
Hybrid search
Keyword search is good at exact terms and bad at meaning; vector search is the opposite. sift runs both: Postgres full-text search and pgvector similarity over the same documents.
The two ranked lists are merged with Reciprocal Rank Fusion: each document scores Σ 1 / (60 + rank) across the lists, so a result that does well in both beats one that tops only one.
Built to run for free
- Embeddings run locally on ONNX (BAAI/bge-small-en-v1.5), so there is no paid API.
- Everything is configured by environment variables: the same code runs against Docker in development and free managed tiers in production.
- Multi-tenant teams with invites and roles, JWT auth and Alembic migrations.