About this episode
At inference, large language models use in-context learning with zero-, one-, or few-shot examples to perform new tasks without weight updates, and can be grounded with Retrieval Augmented Generation (RAG) by embedding documents into vector databases for real-time factual lookup using cosine similarity. LLM agents autonomously plan, act, and use external tools via orchestrated loops with persistent memory, while recent benchmarks like GPQA (STEM reasoning), SWE Bench (agentic coding), and MMMU (multimodal college-level tasks) test performance alongside prompt engineering techniques such as chain-of-thought reasoning, structured few-shot prompts, positive instruction framing, and iterative self-correction.
Links
In-Context Learning (ICL)
- Definition: LLMs can perform tasks by learning from examples provided directly in the prompt without updating their parameters.
- Types:
- Zero-shot: Direct query, no examples provided.
- One-shot: Single example provided.
- Few-shot: Multiple examples, balancing quantity with context window limitations.
- Mechanism: ICL works through analogy and Bayesian inference, using examples as semantic priors to activate relevant internal representations.
- Emergent Properties: ICL is an "inference-time training" approach, leveraging the model’s pre-trained knowledge without gradient updates; its effectiveness can be enhanced with diverse, non-redundant examples.
Retrieval Augmented Generation (RAG) and Grounding
- Grounding: Connecting LLMs with external knowledge bases to supplement or update static training data.
- Motivation: LLMs’ training data becomes outdated or lacks proprietary/specialized knowledge.
- Benefit: Reduces hallucinations and improves factual accuracy by incorporating current or domain-specific information.
- RAG Workflow:
- Embedding: Documents are converted into vector embeddings (using sentence transformers or representation models).
- Storage: Vectors are stored in a vector database (e.g., FAISS, ChromaDB, Qdrant).
- Retrieval: When a query is made, relevant chunks are extracted based on similarity, possibly with re-ranking or additional query processing.
- Augmentation: Retrieved chunks are added to the prompt to provide up-to-date context for generation.
- Generation: The LLM generates responses informed by the augmented context.
- Advanced RAG: Includes agentic approaches—self-correction, aggregation, or multi-agent contribution to source ingestion, and can integrate external document sources (e.g., web search for real-time info, or custom datasets for private knowledge).
LLM Agents
- Overview: Agents extend LLMs by providing goal-oriented, iterative problem-solving through interaction, memory, planning, and tool usage.
- Key Components:
- Reasoning Engine (LLM Core): Interprets goals, states, and makes decisions.
- Planning Module: Breaks down complex tasks using strategies such as Chain of Thought or ReAct; can incorporate reflection and adjustment.
- Memory: Short-term via context window; long-term via persistent storage like RAG-integrated databases or special memory systems.
- Tools and APIs: Agents select and use external functions—file manipulation, browser control, code execution, database queries, or invoking smaller/fine-tuned models.
- Capabilities: Support self-evaluation, correction, and multi-step planning; allow integration with other agents (multi-agent systems); face limitations in memory continuity, adaptivity, and controllability.
- Current Trends: Research and development are shifting toward these agentic paradigms as LLM core scaling saturates.
Multimodal Large Language Models (MLLMs)
- Definition: Models capable of ingesting and generating across different modalities (text, image, audio, video).
- Architecture:
- Modality-Specific Encoders: Convert raw modalities (text, image, audio) into numeric embeddings (e.g., vision transformers for images).
- Fusion/Alignment Layer: Embeddings from different modalities are projected into a shared space, often via cross-attention or concatenation, allowing the model to jointly reason about their content.
- Unified Transformer Backbone: Processes fused embeddings to allow cross-modal reasoning and generates outputs in the required format.
- Recent Advances: Unified architectures (e.g., GPT-4o) use a single model for all modalities rather than switching between separate sub-models.
- Functionality: Enables actions such as image analysis via text prompts, visual Q&A, and integrated speech recognition/generation.
Advanced LLM Architectures and Training Directions
- Predictive Abstract Representation: Incorporating latent concept prediction alongside token prediction (e.g., via autoencoders).
- Patch-Level Training: Predicting larger “patches” of tokens to reduce sequence lengths and computation.
- Concept-Centric Modeling: Moving from next-token prediction to predicting sequences of semantic concepts (e.g., Meta’s Large Concept Model).
- Multi-Token Prediction: Training models to predict multiple future tokens for broader context capture.
Evaluation Benchmarks (as of 2025)
- Key Benchmarks Used for LLM Evaluation:
- GPQA (Diamond): Graduate-level STEM reasoning.
- SWE Bench Verified: Real-world software engineering, verifying agentic code abilities.
- MMMU: Multimodal, college-level cross-disciplinary reasoning.
- HumanEval: Python coding correctness.
- HLE (Human’s Last Exam): Extremely challenging, multimodal knowledge assessment.
- LiveCodeBench: Coding with contamination-free, up-to-date problems.
- MLPerf Inference v5.0 Long Context: Throughput/latency for processing long contexts.
- MultiChallenge Conversational AI: Multiturn dialogue, in-context reasoning.
- TAUBench/PFCL: Tool utilization in agentic tasks.
- TruthfulnessQA: Measures tendency toward factual accuracy/robustness against misinformation.
Prompt Engineering: High-Impact Techniques
- Foundational Approaches:
- Few-Shot Prompting: Provide pairs of inputs and desired outputs to steer the LLM.
- Chain of Thought: Instructing the LLM to think step-by-step, either explicitly or through internal self-reprompting, enhances reasoning and output quality.
- Clarity and Structure: Use clear, detailed, and structured instructions—task definition, context, constraints, output format, use of delimiters or markdown structuring.
- Affirmative Directives: Phrase instructions positively (“write a concise summary” instead of “don’t write a long summary”).
- Iterative Self-Refinement: Prompt the LLM to review and improve its prior response for better completeness, clarity, and factuality.
- System Prompt/Role Assignment: Assign a persona or role to the LLM for tailored behavior (e.g., “You are an expert Python programmer”).
- Guideline: Regularly consult official prompting guides from model developers as model capabilities evolve.
Trends and Research Outlook
- Inference-time compute is increasingly important for pushing the boundaries of LLM task performance.
- Agentic LLMs and multimodal reasoning represent the primary frontiers for innovation.
- Prompt engineering and benchmarking remain essential for extracting optimal performance and assessing progress.
- Models are expected to continue evolving with research into new architectures, memory systems, and integration techniques.
Today
MLA 025 AI Image Generation: Midjourney vs Stable Diffusion, GPT-4o, Imagen & Firefly
The 2025 generative AI image market is a trade-off between aesthetic quality, instruction-following, and user control. This episode analyzes the key platforms, comparing Midjourney's artistic output against the superior text generation and prompt adherence of GPT-4o and Imagen 4, ... Show More
1h 12m
May 30
MLG 036 Autoencoders
Auto encoders are neural networks that compress data into a smaller "code," enabling dimensionality reduction, data cleaning, and lossy compression by reconstructing original inputs from this code. Advanced auto encoder types, such as denoising, sparse, and variational auto encod ... Show More
1h 5m
May 7
MLG 034 Large Language Models 1
Explains language models (LLMs) advancements. Scaling laws - the relationships among model size, data size, and compute - and how emergent abilities such as in-context learning, multi-step reasoning, and instruction following arise once certain scaling thresholds are crossed. The ... Show More
50m 48s
Sep 2024
Large Language Model (LLM) Risks and Mitigation Strategies
As machine learning algorithms continue to evolve, Large Language Models (LLMs) like GPT-4 are gaining popularity. While these models hold great promise in revolutionizing various functions and industries—ranging from content generation and customer service to research and develo ... Show More
28m 58s
Apr 8
Andriy Burkov - The TRUTH About Large Language Models and Agentic AI (with Andriy Burkov, Author "The Hundred-Page Language Models Book")
Andriy Burkov is a renowned machine learning expert and leader. He's also the author of (so far) three books on machine learning, including the recently-released "The Hundred-Page Language Models Book", which takes curious people from the very basics of language models all the wa ... Show More
1h 24m
Jul 2024
Building Real-World LLM Products with Fine-Tuning and More with Hamel Husain - #694
Today, we're joined by Hamel Husain, founder of Parlance Labs, to discuss the ins and outs of building real-world products using large language models (LLMs). We kick things off discussing novel applications of LLMs and how to think about modern AI user experiences. We then dig i ... Show More
1h 20m
Aug 2024
Episode 201 - Introduction to KitOps for MLOps
Join Allen and Mark in this episode of Two Voice Devs as they dive into the world of MLOps and explore KitOps, an open-source tool for packaging and versioning machine learning models and related artifacts. Learn how KitOps leverages the Open Container Initiative (OCI) standard t ... Show More
33m 59s
Apr 12
Simplifying Data Pipelines with Durable Execution
Summary
In this episode of the Data Engineering Podcast Jeremy Edberg, CEO of DBOS, about durable execution and its impact on designing and implementing business logic for data systems. Jeremy explains how DBOS's serverless platform and orchestrator provide local resilience and r ... Show More
39m 49s
Aug 2024
Metrics Driven Development
How do you systematically measure, optimize, and improve the performance of LLM applications (like those powered by RAG or tool use)? Ragas is an open source effort that has been trying to answer this question comprehensively, and they are promoting a “Metrics Driven Development” ... Show More
42m 12s
Nov 2024
Code Generation & Synthetic Data With Loubna Ben Allal #51
Our guest today is Loubna Ben Allal, Machine Learning Engineer at Hugging Face 🤗 . In our conversation, Loubna first explains how she built two impressive code generation models: StarCoder and StarCoder2. We dig into the importance of data when training large models and what can ... Show More
47m 6s
Feb 2025
LLMs and Graphs Synergy
In this episode, Garima Agrawal, a senior researcher and AI consultant, brings her years of experience in data science and artificial intelligence. Listeners will learn about the evolving role of knowledge graphs in augmenting large language models (LLMs) for domain-specific task ... Show More
34m 47s
Dec 2024
The Art of Database Selection and Evolution
Summary
In this episode of the Data Engineering Podcast Sam Kleinman talks about the pivotal role of databases in software engineering. Sam shares his journey into the world of data and discusses the complexities of database selection, highlighting the trade-offs between differen ... Show More
59m 56s
Oct 2024
Accelerate Migration Of Your Data Warehouse with Datafold's AI Powered Migration Agent
Summary
Gleb Mezhanskiy, CEO and co-founder of DataFold, joins Tobias Macey to discuss the challenges and innovations in data migrations. Gleb shares his experiences building and scaling data platforms at companies like Autodesk and Lyft, and how these experiences inspired the cr ... Show More
48m 50s