Seven self-contained Python projects demonstrating the patterns covered in this guide.
pip install anthropic python-dotenvEach project has its own requirements.txt with additional dependencies.
| Project | What It Demonstrates | Key Dependencies |
|---|---|---|
| 01-basic-rag | Full RAG pipeline from scratch | anthropic, sentence-transformers, numpy |
| 02-advanced-rag | HyDE, reranking, parent-child chunking | anthropic, sentence-transformers, qdrant-client |
| 03-langgraph-agent | ReAct agent with LangGraph | anthropic, langgraph, langchain-anthropic |
| 04-mcp-server | Custom MCP server | anthropic, mcp |
| 05-eval-pipeline | LLM-as-judge evaluation pipeline | anthropic, pandas |
| 06-semantic-cache | Semantic caching with embeddings | anthropic, sentence-transformers, redis |
| 07-structured-output | Pydantic structured extraction | anthropic, instructor, pydantic |
- Copy
.env.exampleto.envin any project directory - Add your
ANTHROPIC_API_KEY - Install dependencies:
pip install -r requirements.txt - Run the example:
python main.py
- Each project is standalone — no shared code between projects
- Under 200 lines per main file so the full logic fits in one read
- Real runnable code, not pseudocode
- Uses the Anthropic Python SDK as the primary interface