Outline updated November 2026
Generative AI and LLMs for Python Programmers
Class Duration
35 hours of live training delivered over 5 days.
Student Prerequisites
- Experience with Python is required.
- No generative AI experience is required.
Target Audience
Python programmers and software engineers who want a broad grounding in generative AI and LLMs, from transformer basics to fine-tuning, RAG, agents, and responsible deployment.
Description
This course takes Python developers from no generative AI experience to a working grasp of the field. It starts with how text generation evolved, from N-grams and RNNs to transformers and attention. Students then call current Claude, GPT, and Gemini models from Python for prompting, structured outputs, tool calling, embeddings, and RAG. Later modules cover pre-training, fine-tuning, PEFT, and RLHF, and when to choose each technique. The course ends with local models, evals, cost, and responsible AI practice.
Learning Outcomes
- Explain how LLMs evolved from N-grams and RNNs to transformers.
- Explain attention and positional encoding.
- Control text generation with prompts, context, and sampling settings.
- Call Claude, GPT, and Gemini models from Python with streaming and tool calling.
- Generate structured outputs validated with Pydantic.
- Build semantic search with embeddings.
- Implement RAG with chunking, vector stores, hybrid search, and reranking.
- Explain agent patterns and the Model Context Protocol (MCP).
- Plan a generative AI project from scoping to monitoring.
- Explain pre-training, fine-tuning, PEFT, and alignment with human feedback.
- Choose between prompting, RAG, and fine-tuning for a given problem.
- Run open-weight models locally with Ollama and vLLM.
- Evaluate LLM applications with evals and observability tools.
- Apply responsible AI practices for bias, privacy, and security.
Training Materials
Comprehensive courseware is distributed online at the start of class.
Software Requirements
Students will need a free, personal GitHub account to access the courseware. Students will need permission to install Docker Desktop, Python, Visual Studio Code, and Visual Studio Code Extensions on their computers.
Training Topics
Introduction to Generative AI & LLMs
- Overview of generative AI
- Large language models (LLMs)
- History of text generation
- Use cases and tasks for LLMs
- LLMs in modern software
Text Generation before Transformers
- N-grams and statistical language models
- Recurrent neural networks (RNNs)
- Long short-term memory (LSTM) networks
- Limits of pre-transformer models
Transformer Architecture
- Transformer models
- The attention mechanism
- Encoder-decoder architecture
- Self-attention and multi-head attention
- Positional encoding
- Mixture-of-experts (MoE) models
Tokens, Sampling, and Generative Configuration
- Tokenization and context windows
- Greedy decoding and controlled sampling
- Beam search and top-k/top-p sampling
- Temperature and inference configurations
- Model, training, and fine-tuning configurations
- Practical examples of text generation
Provider Setup and SDK Fundamentals
- Anthropic, OpenAI, and Gemini Python SDK setup
- API keys and environments
- Request and response anatomy
- Integrating LLMs into applications
- Streaming responses
- Standardized message APIs
- Error handling and rate limits
Current Frontier Models
- The Claude model family
- The GPT model family
- The Gemini model family
- Model tiers by capability and cost
- Reasoning modes and effort controls
- Choosing models by task
- Open-weight alternatives
Prompting and Prompt Engineering
- Prompt engineering basics
- Designing effective prompts
- System prompts, roles, and few-shot examples
- Chain-of-thought reasoning and planning
- Prompt optimization techniques
- Examples and best practices
Context Engineering
- From prompt to context engineering
- What belongs in the context window
- Context budgets in long interactions
- Summarization and compaction
- Grounding with retrieved content
Structured Outputs with Pydantic
- JSON Schema-constrained generation
- Pydantic models as output contracts
- Recovering from malformed responses
- Extraction, classification, and routing
- When structure hurts quality
Tool Use and Function Calling
- Tool use with external applications
- Tool schemas, names, and descriptions
- The tool-call round trip
- Sequential and parallel tool calls
- Program-aided language models (PAL)
Multimodal Inputs
- Images as model input
- PDFs and rich documents
- Audio input and transcription
- Multimodal prompting patterns
- Cost and latency of multimodal calls
Embeddings and Semantic Search
- Vector embeddings and similarity search
- Embedding models and dimensions
- Distance metrics and nearest neighbors
- Semantic vs. keyword search
- Clustering and classification with embeddings
RAG Fundamentals
- When to use retrieval-augmented generation
- Chunking and metadata
- pgvector, Qdrant, and Chroma
- Grounded prompts and citations
- Naive RAG and its failure modes
RAG Quality: Hybrid Search, Reranking, and Evaluation
- Hybrid BM25 and vector search
- Reranking
- RAG evaluation suites
- Precision, recall, and groundedness
- Improving retrieval quality
Agentic Patterns and MCP
- Agents vs. workflows
- Tool use and the agent loop
- ReAct for reasoning and acting
- The Model Context Protocol (MCP)
- Multi-agent orchestration
- Background agents and long tasks
Generative AI Project Lifecycle
- Project planning and scoping
- Data collection and preprocessing
- Model selection and training
- Evaluation and iteration
- Deployment and monitoring
- LLM application architectures
- Lifecycle best practices and pitfalls
Pre-training Large Language Models
- Pre-training objectives
- Pre-training datasets
- Computational challenges
- Scaling laws and compute-optimal models
Domain Adaptation, Fine-Tuning, and PEFT
- Domain adaptation techniques
- Instruction fine-tuning
- Single-task fine-tuning
- Multi-task instruction fine-tuning
- Parameter-efficient fine-tuning (PEFT)
- LoRA (low-rank adaptation)
- Soft prompts
Aligning Models with Human Values
- Model alignment basics
- Reinforcement learning from human feedback (RLHF)
- Collecting human feedback
- Reward models
- Fine-tuning with reinforcement learning
- Reward hacking
- Scaling human feedback
Prompting vs. RAG vs. Fine-Tuning
- Choosing how to adapt model behavior
- When prompting is enough
- Retrieval vs. fine-tuning
- Combining approaches
- Cost and data needs of each path
Model Optimization and Local Models
- Model compression techniques
- Quantization and pruning
- Optimizing inference performance
- Deployment strategies
- Serving open-weight models with Ollama and vLLM
- Privacy and data residency
Evals, Observability, and Cost Engineering
- Evaluation metrics for LLMs
- Standard benchmarks
- Evaluating model performance
- Golden datasets and LLM-as-judge
- Observability with Langfuse or Braintrust
- Prompt caching and cost control
Responsible AI and Keeping Current
- Ethics in generative AI
- Bias and fairness in LLMs
- Privacy and security concerns
- Prompt injection and new threats
- Responsible AI practices
- Tracking model releases