LLM Inference with Few-Shot Prompting and Chain of Thought
summary
Combines few-shot prompting with chain-of-thought and shows a working inference pipeline built on Hugging Face models and OpenAI-style APIs, running Falcon 7B and Llama 3-style checkpoints with adjustable params. Demonstrates a poetry generator and a multi-step shopping cost calculator that uses self-consistency majority vote across 10 reasoning traces and temperature 0.95, max_new_tokens 300 to boost creativity. Finds few-shot + CoT reduces obvious errors but a wrong intermediate step still cascades, so majority-vote and step-level validation are necessary.
AI-written summary · about
chapters (10)
- 0:00Introduction to LLM prompting
- 3:19Transformer architecture basics
- 8:45Positional encoding and attention
- 13:00Prompt engineering fundamentals
- 16:14Zero-shot vs few-shot learning
- 18:51Chain of Thought prompting
- 21:21Multi-step reasoning demo
- 23:33Poetry generation with constraints
- 24:40Cost calculation example
- 25:46Q&A session
related talks
58mIn-Context Principle Learning from Mistakes
01h 39mMastering LLMs: From Prompt Engineering to Agentic AI
19mUnlocking the Full Potential of LLMs: Advanced Prompt Engineering Techniques
01h 08mIn Prompts We Trust
39mUnlocking reasoning in Large language models
25mFrontier AI Models: A Review of Past Nine Months
27mBuilding Mini Minds Our Adventures in Teaching Small LLMs to Reason
46mBeyond Basic Prompting: Supercharging Open Source LLMs with LMQL's Structured Generation
