meta_pixel
Tapesearch Logo
Log in
Machine Learning Guide

MLG 035 Large Language Models 2

Machine Learning Guide

OCDevel

Artificial, Introduction, Learning, Courses, Technology, Ml, Intelligence, Ai, Machine, Education

4.9848 Ratings

🗓️ 8 May 2025

⏱️ 45 minutes

🧾️ Download transcript

Summary

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:
    1. Embedding: Documents are converted into vector embeddings (using sentence transformers or representation models).
    2. Storage: Vectors are stored in a vector database (e.g., FAISS, ChromaDB, Qdrant).
    3. Retrieval: When a query is made, relevant chunks are extracted based on similarity, possibly with re-ranking or additional query processing.
    4. Augmentation: Retrieved chunks are added to the prompt to provide up-to-date context for generation.
    5. 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.

Transcript

Click on a timestamp to play from that location

0:00.0

Machine Learning Guide episode 35, Large Language Models Part 2, and we're picking up back with

0:08.5

test time scaling, inference time, inference time training, reasoning, that sort of umbrella

0:14.9

category of territory. The last thing we covered was chain of thought, where you prompt a model to think step by step

0:22.6

and either as a single prompt so that the output includes in its tokens the step-by-step

0:28.2

thinking process, which drastically improves the accuracy of the outputs.

0:32.6

Or as part of the model machinery, I don't know that it's baked into the model architecture per se,

0:38.7

but it may be tacked on technologically on the model after deployment that causes the model

0:44.8

to reprompt itself with continued chains of thoughts until it gets the answer confidently.

0:51.8

And now we are going to move on to ICL. Okay. In context learning,

0:57.4

in context learning, we've already talked about this. It is like zero shot, one shot, and few

1:02.9

shot prompting. So giving it some examples to work with, you say, here's an unstructured

1:10.3

text blob of trucking data. Find a truck.

1:14.5

com. AI might do this. And here's a JSON output that I would have converted that to. Now, here's a new

1:21.8

text blob of trucking data. Now you go. And that would be a one-shot prompt.

1:27.5

So this is called in context learning, learning from the prompt itself, the task it needs to perform, rather than that coming from the training data in the SFT training phase.

1:39.3

So it's the ability to learn during inference by being presented simply with a prompt containing a few demonstrations, input, output examples of the task without any updates to the model weights, no gradient descent.

1:53.2

So the thinking behind how this works is obviously the model is leveraging vast knowledge and patterns learned during pre-training,

2:01.8

but the thinking on this specific structure is that the examples provide a semantic prior in

2:08.8

like Bayesian inference, and it guides the LLM to identify and activate relevant latent representations

2:16.0

or concepts learned during pre-training that correspond to the demonstrated task.

2:21.8

So it's learning by analogy from the context.

2:24.9

So it's like a Bayesian inference perspective, and it suggests that the model uses prompt examples as evidence to infer the underlying task or concept, sharpening its posterior distribution

...

Please login to see the full transcript.

Disclaimer: The podcast and artwork embedded on this page are from OCDevel, and are the property of its owner and not affiliated with or endorsed by Tapesearch.

Generated transcripts are the property of OCDevel and are distributed freely under the Fair Use doctrine. Transcripts generated by Tapesearch are not guaranteed to be accurate.

Copyright © Tapesearch 2025.