Analysis updated 2026-05-18
Follow the decision guides to choose between keyword search, embedding search, or a hybrid approach for a retrieval system.
Use the layered pipeline pattern to filter and narrow candidates before an LLM makes a final judgment call.
Run the example tracks to build a proposal-to-brief matching or hybrid search pipeline in plain Python.
| saqlainxoas/llm-system-patterns | 0xjbb/modulestomped | abhisumatk/epstein_files_rag | |
|---|---|---|---|
| Stars | 34 | 34 | 34 |
| Language | — | C++ | Python |
| Setup difficulty | easy | moderate | moderate |
| Complexity | 3/5 | 4/5 | 3/5 |
| Audience | developer | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Mostly Markdown patterns and decision guides, the plain Python examples need only a standard Python environment to run.
This repository is a reference library for developers who want to build AI systems that retrieve and rank information before passing it to a language model. Rather than dumping everything into the model at once, the core idea is to filter and narrow down candidates through several cheaper stages first, then let the AI make a final judgment only on what survives. The collection covers thirteen named patterns plus decision guides and runnable examples. The patterns address questions like: when does keyword search outperform a neural embedding search, when should you combine both approaches, how do you handle short tokens or abbreviations that confuse embeddings, and when is adding a reranking step actually worth the extra time and cost. There are also patterns on chunking long documents, defending against prompt injection, budgeting for cost and latency, and controlling memory when processing large batches. The decision guides are written to help you pick the right approach without reading every pattern first. One guide walks through the choice between embedding-based search, keyword search, and hybrid search. Another covers when to use a reranker. A third explains when to trust an LLM to score or judge results versus using a simpler deterministic check. The fourth compares RAG (retrieval-augmented generation) with fine-tuning a model directly. The example tracks give concrete build paths. The flagship example matches proposals to a brief using the full layered pipeline. Other examples cover bulk scoring, adding a vector store, filtering results by metadata before searching, running a hybrid search pipeline, and doing retrieval without any external framework. All code examples are plain Python with no heavy abstractions. The repo is part of a three-project family. A sibling repository covers orchestration and agent workflow patterns, and a third collects AI research notes. Together they are meant to take a reader from concept to working system architecture. The license is MIT.
A docs-first guide to designing LLM retrieval and ranking systems, covering hybrid search, reranking, chunking, and LLM-as-judge patterns with runnable Python examples.
MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.