How lu-yanru/42-rag_against_the_machine works
This repository is documented as a RAG system for answering questions about a vLLM codebase. Its workflow indexes source files, retrieves relevant spans by lexical, semantic, or hybrid search, then either saves search results or generates and evaluates answers. The README describes the major components and their relationships, but their src/ implementation files and processed/output data paths are absent from the supplied tree; those nodes therefore have no asserted source path.
Main entry points: vllm-0.10.1 vLLM source corpus
Components 20
Indexing
- File loader
- Text and AST chunkers
- Incremental indexer
- BM25 index
- Embedding index
- Sentence transformer
Retrieval
- Query cache
- BM25 retriever
- Semantic retriever
- Hybrid RRF
- Source locations
- Search results
Answers and evaluation
- Answer generator
- Qwen3 model
- Answers and sources
- Recall evaluator
Other components
- Questioner
- vLLM source corpus
data/raw/vllm-0.10.1 - CLI
- Reference answers
Connections 31
- CLI → File loader: indexes files
- File loader → vLLM source corpus: reads files
- File loader → Text and AST chunkers: provides text
- Text and AST chunkers → Incremental indexer: provides chunks
- Incremental indexer → BM25 index: builds BM25
- Incremental indexer → Embedding index: builds embeddings
- Incremental indexer → Sentence transformer: encodes chunks
- Questioner → CLI: submits question
- CLI → Query cache: checks cache
- CLI → BM25 retriever: dispatches lexical
- CLI → Semantic retriever: dispatches semantic
- CLI → Hybrid RRF: dispatches hybrid
- BM25 retriever → BM25 index: searches index
- Semantic retriever → Embedding index: searches vectors
- Semantic retriever → Sentence transformer: encodes query
- Hybrid RRF → BM25 retriever: combines rankings
- Hybrid RRF → Semantic retriever: combines rankings
- BM25 retriever → Source locations: returns locations
- Semantic retriever → Source locations: returns locations
- Hybrid RRF → Source locations: returns locations
- CLI → Query cache: stores results
- Query cache → Source locations: returns cached locations
- CLI → Search results: saves search
- CLI → Answer generator: requests answer
- Answer generator → Source locations: reads spans
- Answer generator → vLLM source corpus: reopens source
- Answer generator → Qwen3 model: generates response
- Answer generator → Answers and sources: saves answer
- CLI → Recall evaluator: runs evaluation
- Recall evaluator → Search results: scores retrieval
- Recall evaluator → Reference answers: compares references