Claude Chat CLI with Hybrid RAG Retrieval¶
Build and inspect a multi-turn Claude CLI with streaming responses, native web search, hybrid local retrieval, source grounding, and prompt evaluation.
Get started Explore the architecture
What the repository demonstrates¶
- A streaming Anthropic Messages API client with persistent conversation history.
- Optional extended thinking, prompt caching, and native web search.
- AST-aware Python and heading-aware Markdown chunking.
- Okapi BM25 and exact cosine vector search implemented without a search framework.
- Reciprocal Rank Fusion across lexical and semantic rankings.
- Grounded prompts with citations, abstention behavior, and prompt-injection boundaries.
- Deterministic retrieval evaluation and LLM-as-judge prompt evaluation.
Choose a path¶
| Goal | Start here |
|---|---|
| Run the finished assistant | Get started |
| Understand retrieval and generation boundaries | Architecture |
| Inspect the implementation | Repository on GitHub |
Guide automation is review-gated
Executable tutorial commands are verified in CI. The generation workflow can draft one planned offline tutorial as a pull request, but facts, curriculum, rendering, and human editorial review must all pass before it can merge.