Welcome to the comprehensive Prompt Engineering learning resource! This repository serves as a practical guide to understanding and implementing effective prompt engineering techniques with Large Language Models (LLMs).
This repository contains hands-on Jupyter notebooks that demonstrate various prompt engineering principles and techniques. Each notebook provides detailed explanations, practical examples, and code implementations to help you master the art of crafting effective prompts for AI models.
- Fundamental prompt engineering concepts and best practices
- Zero-shot prompting - Getting quality outputs without examples
- Multi-shot prompting - Leveraging examples to guide model behavior
- Chain-of-Thought (CoT) prompting - Breaking down complex reasoning tasks
- Real-world applications and use cases
- Hands-on coding examples using OpenAI's API
prompt-engineering/
├── README.md # This file
├── requirements.txt # Python dependencies
├── pyproject.toml # Project configuration
├── uv.lock # Dependency lock file
└── prompt-engineering-techniques/ # Core learning materials
├── zero-shot-prompting.ipynb # No-example prompting techniques
├── multi-shot-prompting.ipynb # Few-shot learning with examples
└── cot-prompting.ipynb # Chain-of-thought reasoning
- Python 3.13 or higher
- OpenAI API key (sign up at OpenAI)
- Basic understanding of Python and Jupyter notebooks
- Make sure UV is installed on your machine
-
Clone the repository:
git clone https://github.com/SuperDataScience-Community/prompt-engineering.git cd prompt-engineering -
Create and activate virtual environment
For Windows:
python -m venv .venv # create the virtual environment .venv\Scripts\Activate # activate the virtual environment
For Mac/Linux:
python3 -m venv .venv # create the virtual environment source .venv/bin/activate # activate the virtual environment
-
Install dependencies:
Using pip:
pip install -r requirements.txt
Or using uv (recommended):
uv sync
-
Set up your OpenAI API key:
Create a
.envfile in the project root:echo "OPENAI_API_KEY=your_api_key_here" > .env
Replace
your_api_key_herewith your actual OpenAI API key. -
Start learning:
jupyter notebook prompt-engineering-techniques/
-
Start with Zero-Shot Prompting (
zero-shot-prompting.ipynb)- Learn the fundamentals of prompt construction
- Understand prompt elements: instruction, context, input data, output indicator
-
Progress to Multi-Shot Prompting (
multi-shot-prompting.ipynb)- Discover how examples improve model performance
- Learn when and how to use few-shot learning
-
Master Chain-of-Thought Prompting (
cot-prompting.ipynb)- Break down complex reasoning tasks
- Implement step-by-step problem solving
- OpenAI - For accessing GPT models
- python-dotenv - For environment variable management
- ipykernel - For Jupyter notebook support
We welcome contributions from the community! Here's how you can help:
- Report Issues - Found a bug or have a suggestion? Open an issue
- Improve Documentation - Help make our explanations clearer
- Add Examples - Contribute new prompt engineering techniques or use cases
- Fix Bugs - Submit pull requests for any issues you find
- Fork the repository and create a feature branch
- Follow the existing code style and notebook structure
- Test your changes - Ensure all notebooks run successfully
- Add clear documentation - Explain your examples and techniques
- Submit a pull request with a clear description of your changes
When contributing notebooks:
- Include clear markdown explanations
- Provide practical, working code examples
- Use consistent naming conventions
- Add relevant comments and docstrings
- Test with the OpenAI API to ensure functionality
- 📧 Open a GitHub Issue or start a Discussion
- 💬 Join our community: AI Engineering Q&A
- 📧 Email: shaheer@superdatascience.com
If you have questions about transitioning into AI/Data Science or general questions about the field, feel free to reach out:
- 📧 Email: shaheerairajahmed@gmail.com
- 💼 LinkedIn: linkedin.com/in/shaheerairajahmed
- 🐙 GitHub: github.com/shaheerairaj
Happy Learning! 🎉 Start your prompt engineering journey today and unlock the full potential of Large Language Models.