How ivanfioravanti/prompt-eng-ollama-interactive-tutorial works
Project type and purpose
• This repository is an interactive, educational tutorial for prompt engineering using Ollama’s Qwen models.
• It is not a traditional web or microservice application but a self‑contained set of Jupyter notebooks (the “course modules”) plus a small helper library (hints.py) that demonstrate best practices in prompt writing and allow you to experiment live with the Ollama model.
File structure
• Top‑level files:
• README.md – course overview and structure
• LICENSE, .gitignore – repo meta
• hints.py – Python helper utilities shared by notebooks
• Jupyter notebooks (00_… through 10.2_…):
• 00_Tutorial_How‑To.ipynb – orientation to the environment
• 01_… to 09_… – nine sequential “chapters,” each with lessons and playground exercises
• 10.1_Appendix_… and 10.2_Appendix_… – chaining prompts and tool‑use extensions
README for additional insights
• The README outlines a linear, chapter‑based progression from beginner to advanced techniques, with each notebook containing an “Example Playground” for live experimentation.
• It specifies the external dependency on the Ollama Qwen 2.5:14B (or 7B) model.
a. Main components
1. Developer/User Environment
– Jupyter Notebook interface (local or remote)
– Python runtime
2. Course Modules
– Notebook files (00_… → 10.2_…) containing lesson content + code cells
– Playground cells that invoke prompt runs
3. Support Library
– hints.py (common utility functions, e.g., formatting prompts or parsing responses)
4. Ollama Model Service
– Local/remote Qwen 2.5 model invoked via CLI or Python binding
b. Relationships and interactions
– Notebooks import hints.py for shared functions
– Code cells call the Ollama client (e.g., ollama run qwen2.5:14b …)
– Ollama service returns model outputs, which are rendered in the notebook
– User reads prompts, edits them, re‑runs cells to observe changes
c. Architectural patterns and design principles
– Separation of content (markdown explanations) vs. executable code
– Single source of truth for helper logic in hints.py (DRY principle)
– Linear progression of modules, with appendices for advanced topics
d. Key technologies, frameworks, and libraries
– Jupyter Notebook
– Python 3.x
– Ollama CLI or Python binding for Qwen 2.5
– Git for version control
Elements
• Clear labels:
• “User / Developer Environment”
• “Jupyter Notebook Server”
• “Lesson Notebooks (01…09)”
• “Appendix Notebooks (10.1, 10.2)”
• “hints.py Utility Module”
• “Ollama Qwen Model Service”
• Notebooks → hints.py (dependency)
• Notebooks → Ollama service (prompt execution)
• Ollama → Notebooks (response rendering)
• Utility code (hints.py) in another