https://github.com/taggedzi/python-design-pattern-rag
A collection of python design pattern examples and documentation. Also converted into Markdown format and setup for easy RAG consumption.
https://github.com/taggedzi/python-design-pattern-rag
ai-assisted-coding code-examples design-patterns documentation education educational examples learning-resources lesson-plans llm-integration object-oriented-programming open-webui patterns python python-3 python-patterns python3 rag retrieval-augmented-generation software-architecture
Last synced: 3 months ago
JSON representation
A collection of python design pattern examples and documentation. Also converted into Markdown format and setup for easy RAG consumption.
- Host: GitHub
- URL: https://github.com/taggedzi/python-design-pattern-rag
- Owner: taggedzi
- License: mit
- Created: 2025-05-06T11:48:30.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-05-13T20:17:05.000Z (8 months ago)
- Last Synced: 2025-05-13T21:31:44.833Z (8 months ago)
- Topics: ai-assisted-coding, code-examples, design-patterns, documentation, education, educational, examples, learning-resources, lesson-plans, llm-integration, object-oriented-programming, open-webui, patterns, python, python-3, python-patterns, python3, rag, retrieval-augmented-generation, software-architecture
- Language: Python
- Homepage: https://taggedzi.github.io/python-design-pattern-rag/
- Size: 230 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# 🧠 Python Design Patterns — Learn & Use with AI





> 📚 **Looking to learn design patterns in Python?**
> Explore our [docs and lessons](https://taggedzi.github.io/python-design-pattern-rag/) to study and apply design patterns through clear, hands-on examples — perfect for self-paced learning or AI-assisted coding!
---
## 📌 What This Project Does
This repository helps you:
1. **Learn software design patterns in Python** with clean, structured examples.
2. **Use those lessons with LLMs** like ChatGPT, Open WebUI, or Ollama for **Retrieval-Augmented Generation (RAG)** coding workflows.
3. **Leverage preprocessed pattern chunks** and a searchable index to integrate design knowledge directly into AI tooling.
---
## 🏫 Educational Lessons & Docs
Visit our [website](https://taggedzi.github.io/python-design-pattern-rag/) or the [`docs/`](docs/) directory to find:
* Lesson plans and code walkthroughs for each pattern.
* Example-driven explanations optimized for learning and memory.
* Markdown-formatted versions ideal for study or RAG ingestion.
---
## 🔄 RAG-Optimized Content
If you want to integrate pattern knowledge into AI tools:
* Use the `chunks/` directory: preprocessed, docstring-enhanced Markdown files.
* Reference `summary_index.json`: a machine-readable index with metadata and summaries.
These resources are **ready to drop into Open WebUI, Ollama**, or any system that supports knowledge base ingestion.
---
## 🛠 How to Use with Open WebUI + Ollama
### 1. Add to a Knowledge Base
* Open the **"Knowledge"** tab in WebUI.
* Create a new base using the `chunks/` folder.
### 2. Ask Contextual Questions
Use your RAG-enabled system to ask:
```text
How do I implement the Builder pattern in Python?
What's the difference between Singleton and Borg?
Show me a working example of the Strategy pattern.
```
### 3. Use the Index
Use `summary_index.json` to:
* Power UI navigation
* Search by pattern
* Generate dynamic summaries
---
## 📁 Project Structure
```text
python-design-pattern-rag/
├── chunks/ # RAG-optimized pattern files (Markdown)
├── docs/ # Educational lessons and explanations
├── patterns/ # Raw Python implementations of each pattern
├── ollama/ # Ollama-specific configuration (for development)
├── scripts/ # Scripts for building Docs and RAG files (for development)
├── CONTRIBUTING.md # Instructions and Guidelines for contributing
├── LICENSE # License information
├── README.md # Project overview and instructions
├── requirements.txt # Project dependencies (for development)
├── summary_index.json # Index of all patterns and their RAG files
└── tasks.py # Tasks for building the project
```
---
### 👩💻 Developers & Contributors
If you’d like to build, extend, or contribute to this project, check out our [Developer Guide](CONTRIBUTING.md) for setup instructions and contribution tips.
---
### 🙏 Acknowledgments
This project was created and maintained by Matthew Craig (TaggedZi) with assistance from OpenAI's ChatGPT (powered by GPT-4). Contributions from the various AIs included scaffolding, documentation, and refinement recommendations.
This project also relies on:
* [Ollama](https://ollama.com)
* [Falcon 3](https://ollama.com/library/falcon3) by TII
* [DeepSeek Coder](https://ollama.com/library/deepseek-coder) by DeepSeek
---
### 📄 License
This project is licensed under the **MIT License**. See [LICENSE](./LICENSE) for details.