We welcome contributions that improve this project’s educational value, pattern coverage, and RAG integration. This guide explains how to get your environment set up and how to add or update pattern files.
-
Install Python 3.10+ Download Python if you haven't already.
-
Install Ollama (for local LLMs) Visit ollama.com/download to install Ollama for your platform.
-
Clone the Repository
git clone https://github.com/taggedzi/python-design-pattern-rag.git cd python-design-pattern-rag -
Initialize the Virtual Environment
invoke venv
This command sets up the virtual environment, installs dependencies, and prepares the CLI commands.
-
Create Your Pattern File Add the new pattern implementation under the appropriate folder in
patterns/:patterns/creational/patterns/structural/patterns/behavioral/
-
Generate Lesson and Chunk Files After adding your pattern:
invoke build-all
This will generate:
- Lesson markdown in
docs/ - Chunk markdown in
chunks/ - An updated
summary_index.json
- Lesson markdown in
-
Note: The generation scripts skip files that already exist. To regenerate a specific file, delete it manually before re-running
invoke build-all. -
Edit and Refine Once generated, edit the lesson or chunk files to:
- Fix typos or formatting
- Add extra examples or links
- Improve clarity for learners or RAG usage
invoke build-lessons– Regenerates lessons indocs/invoke build-chunks– Regenerates chunk files for RAGinvoke build-all– Runs both and updates the summary index
This project is made possible with help from:
- Ollama
- Falcon 3 by TII
- DeepSeek Coder by DeepSeek
This project is licensed under the MIT License. See LICENSE for details.