You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
├── chunk_all_patterns.py # Script to chunk all patterns in `patterns/`
55
+
├── summary_index_generator.py # Script to extract summary metadata from chunks
54
56
└── README.md
55
57
```
56
58
57
59
---
58
60
59
61
## 💡 Features
60
62
61
-
-✂️**File-Level Chunking**: Related classes/functions in each `.py` file are preserved as a single chunk
62
-
-🧠**Ollama Integration**: Enhancements use [Falcon 3](https://ollama.com/library/falcon3) or other local models to add docstrings + summaries
63
-
-🗃️**Front Matter Metadata**: Every chunk includes pattern name, file source, and identifiers for easy indexing
63
+
-🏫**Generated Examples of Python Patterns**: Each file is a complete example of a python pattern. See the [patterns](patterns/) folder.
64
+
-🏫**Educational Documentation**: Each python pattern has a generated lesson plan for easy learning and understanding. [Docs](https://taggedzi.github.io/python-design-pattern-rag/)
65
+
-📦**RAG File Generation**: Files in the `chunks/` are enhanced with docstrings and summaries and formatted to be consumed by RAG systems.
64
66
- 🔍 **Summary Index**: Machine-readable JSON index to power GUIs or search
65
67
66
68
---
@@ -109,7 +111,7 @@ Use the `summary_index.json` to:
109
111
- ✅ Command
110
112
- ✅ Facade
111
113
112
-
> New patterns can be added by running `rag_chunker.py` on new source files.
114
+
> New patterns can be added in the `patterns` folder. Then running `invoke build-all` in the root directory of this repo will generate all the Docs, Chunks, and summary_index.json file. Please note EVERY time you run a build comman it will generate all the docs and chunks from scratch using a local LLM so each time the documents for all files will be slightly different. Please only commit files that are relevant to the pattern you're adding. Despite the large amount of automation there is still a lot of manual work involved in building the docs and chunks. Any commits that modify all the files will probably be denied.
113
115
114
116
---
115
117
@@ -127,65 +129,40 @@ Contributions are welcome! You can:
127
129
128
130
Open issues or pull requests for improvements.
129
131
130
-
## Setup
132
+
## Setup if you want to contribute or build RAG files yourself
131
133
132
134
1. Verify you have Python and pip installed. The project runs on python Python 3.10+ and pip. See [Python.org](https://www.python.org/) for installation instructions.
133
135
134
-
2. Use git to clone this repository. `git clone https://github.com/taggedzi/python-design-pattern-rag.git` or download the zip archive and extract it to your desired location.
135
-
136
-
3. Navigate to the project root directory and run `pip install -r requirements.txt`.
136
+
2. Install Ollama and run it locally. Files can be downloaded from [ollama.com](https://ollama.com/download) for thier download options.
137
137
138
-
4. Install Ollama and run it locally. Files can be downloaded from [ollama.com](https://ollama.com/download) for thier download options.
138
+
3. Use git to clone this repository. `git clone https://github.com/taggedzi/python-design-pattern-rag.git` or download the zip archive and extract it to your desired location.
139
139
140
-
5. Download the `falcon3:7b` model locally. See [Falcon 3](https://ollama.com/library/falcon3) for more information.
140
+
4. Navigate to the project root directory and run `invoke venv` to setup the virtial environment, pull down dependancies, and get your envionment ready to go.
141
141
142
-
6. Use Ollama to create the custom model locally. See [ollama/README.md](./ollama/README.md) for more information.
This project was created and maintained by Matthew Craig with assistance from OpenAI's ChatGPT (powered by GPT-4). Contributions from the AI included scaffolding, documentation, and refinement recommendations.
159
+
This project was created and maintained by Matthew Craig (TaggedZi) with assistance from OpenAI's ChatGPT (powered by GPT-4). Contributions from the AI included scaffolding, documentation, and refinement recommendations.
184
160
185
161
This project also relies on:
186
162
187
163
-[Ollama](https://ollama.com) for running local LLMs
188
164
-[Falcon 3](https://ollama.com/library/falcon3) by [TII](https://www.tii.ae/ai-and-digital-science) for AI-based contributions including scaffolding, documentation, and refinement recommendations.
165
+
-[Deepseek Coder](https://ollama.com/library/deepseek-coder) by DeepSeek for AI-based contributsions producing the lesson files.
0 commit comments