An inspectable retrieval-augmented generation skeleton focused on the controls that matter in enterprise search:
- lexical and vector-like retrieval
- reciprocal-rank fusion
- authorization filtering before ranking
- evidence-based extractive answers with citations
- abstention when evidence is weak
python rag_pipeline.py
python -m unittest -vThe sample corpus is synthetic and the dense scorer is intentionally lightweight. Production extensions include real embeddings, a cross-encoder, parent-child chunks, version-aware metadata, prompt-injection defenses, evaluation sets, and tracing.