A practical guide and demonstration of different prompt engineering frameworks using Google's Generative AI.
- Implementation of prompting methodology
- Interactive Jupyter notebook examples
- Ready-to-use prompt templates
- Real-world use cases and examples
- Python 3.8+
- Google API key for Generative AI
- Clone the repository:
git clone https://github.com/yourusername/prompt_frameworks.git
cd prompt_frameworks
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # on Windows, use `venv\Scripts\activate`
- Install the required packages:
pip install -r requirements.txt
-
Get your Google API key for Generative AI from Google AI Studio.
-
Create a
.env
file in the root directory of the project. -
Add the following line to the
.env
file:
GOOGLE_API_KEY=your_api_key_here
- Run the Jupyter notebook:
jupyter notebook # or jupyter lab
- Open the
prompt_frameworks_presentation.ipynb
notebook and follow the instructions.
- Launch the classic notebook interface from the terminal:
jupyter notebook
Firebase Studio will provide a public URL in the terminal output (e.g., http://localhost:8888/...
). Open it in the browser.
-
Once open, select prompt_frameworks_presentation.ipynb.
-
Click the RISE (bar chart) icon in the toolbar to start the slideshow.
Note: RISE currently works best in the classic notebook interface, not JupyterLab
- Convert the Jupyter notebook to a Standalone HTML slideshow using the
nbconvert
command-line tool:
jupyter nbconvert prompt_frameworks_presentation.ipynb --to slides --reveal-prefix https://unpkg.com/reveal.js@5.1.0/ --output presentation.html
- Open the generated
prompt_frameworks_presentation.slides.html
file in a web browser to view the slideshow.
If you're using Firebase Studio or Google Project IDX, you may encounter the following error when running a cell in Jupyter Notebook:
Running cells with 'venv (Python 3.11.10)' requires the ipykernel package.
Run the following command to install 'ipykernel' into the Python environment.
Command: '/home/user/prompt_frameworks/fwenv/bin/python -m pip install ipykernel -U --force-reinstall'
This is caused by the absence of the GNU C++ runtime library (libstdc++.so.6
), which is required by native Python packages such as pyzmq
used by Jupyter.
- Open your
dev.nix
file (located at the root of your project). - Add
pkgs.gcc13
to thepackages
list:
{
channel = "stable-24.05";
packages = [
pkgs.python311
pkgs.python311Packages.pip
pkgs.gcc13 # ✅ Adds libstdc++.so.6 needed for Jupyter
];
env = {};
...
}
- Twitter – @seetechnologic
- GitHub - https://github.com/JavaVista/
- LinkedIn - Javier Carrion
- Website - techno-logic.us
This project is licensed under the MIT License.