Project 01
Enterprise Knowledge Base
Hybrid RAG over a messy corpus, with citations back to source
Ingests a deliberately messy corpus — PDFs, wiki pages, email threads — then chunks, embeds and indexes it. Queries run vector search and BM25 keyword search in parallel, fuse the results, and pass the top candidates through a cross-encoder re-ranker. Every answer cites the source chunk it came from, because an enterprise answer without provenance is unusable.
Try it
How it works
- 01Ingest
Documents land in S3. An event triggers the ingestion Lambda.
- 02Chunk & enrich
Structure-aware chunking, then metadata enrichment (source, section, version).
- 03Embed
Batch embedding calls, cached by content hash so re-ingestion is free.
- 04Index
Vectors and BM25 postings in Aurora Serverless v2 (pgvector + tsvector), one database for both.
- 05Retrieve
Parallel dense + sparse retrieval, reciprocal rank fusion, cross-encoder re-rank of the top 30.
- 06Answer
Grounded generation with inline citations and a refusal path when retrieval returns nothing relevant.
Infrastructure & running cost
| Service | Role | Cost |
|---|---|---|
| Lambda (container) | FastAPI app, shared across all 5 projects | Free tier |
| Aurora Serverless v2 | pgvector + full-text index, scales to 0 ACU | ~$3/mo |
| S3 | Raw corpus + embedding cache | ~$0.10/mo |
| DynamoDB | Query cache, keyed by normalised question | Free tier |
Anchor project — everything else reads from this index.