Add intelligence to your app using OpenAI’s LLMs. Generate structured recipes from ingredients with prompt engineering, render dynamic prompts, call the API, and process outputs. Build a script to extract recipes from messy HTML and store them cleanly.
Overview
Syllabus
- Unit 1: Making Basic LLM Calls
- Setting Up Your OpenAI Client
- Changing Personas with System Prompts
- Crafting Effective User Prompts
- Controlling Randomness with Temperature Settings
- Selecting the Right LLM Model
- Unit 2: Prompt Templates and Variables
- Loading Templates from Files
- Replacing Placeholders with Regular Expressions
- Custom Variable Substitution
- Integrating the Prompt Generation Pipeline
- Creating a Recipe Generator with Templates
- Unit 3: Creating the LLM Manager
- Setting Up the LLM Foundation
- Building the Prompt Rendering Pipeline
- Making the LLM Call
- Adding Robust Error Handling
- Unit 4: AI Recipe Generation
- Creating Recipe Generation Prompt Templates
- Implement Recipe Generation Input Validation
- AI Integration for Recipe Generation
- Set up Recipe Response Parsing Foundation with Debug Output
- Implement Recipe AI Response Parser
- Complete Recipe Generation with JSON Response and Error Handling
- Unit 5: Extracting Recipes from HTML
- Create Recipe Extraction Prompt Templates
- Complete Recipe HTML Extraction Function
- Implement Recipe String Parser
- Complete Recipe Database Storage Implementation
- Complete Recipe Extraction Script Main Function