From LLM Theory to Practical Agentic Implementations - Seth Juarez
Summary
The talk demystifies Large Language Models (LLMs), arguing that their power does not come from inherent intelligence but from engineered 'harnesses' and fundamental primitives. The speaker outlines a progression of techniques—from simple completions to complex agentic loops—that allow developers to build robust, reliable AI systems by controlling the model's input context, output structure, and execution flow. Key concepts include using structured JSON for control flow, implementing tool calling via runtimes (not the LLM itself), establishing guardrails, and orchestrating multi-step workflows through shared 'threads.'
Key takeaways
-
LLMs are Next Token Predictors
1:42
At its core, an LLM is a giant mathematical function that predicts the next token based on input tokens. The perceived intelligence comes from the surrounding runtime logic (the harness), not the model itself.
-
The Agentic Loop is the Core Primitive
21:20
True agency is achieved by implementing an 'agentic loop'—a while loop in the runtime that continuously checks for and executes tool calls, feeding the results back into the context until no more tools are needed. This is the fundamental unit of agency.
-
Guardrails and Bindings Enhance Reliability
35:05
To prevent misuse or incorrect execution (e.g., unauthorized memory access), developers must implement guardrail functions in their runtime logic. Furthermore, 'bindings' allow injecting fixed parameters (like `user ID`) into function calls, removing the burden of context-dependent reasoning from the LLM.
-
Composition Workflow for Multi-Step Agents
50:50
Complex tasks are solved by chaining multiple specialized agents or prompts (e.g., Research $ ightarrow$ Draft $ ightarrow$ Review). All these components share a single, persistent 'thread' context to maintain state and pass control flow sequentially.
Technical details
-
LLM Fundamentals
140s
LMs operate by predicting the next token (a piece of a word) in hyperdimensional space. Training involves calculating a loss function by comparing the predicted probability distribution against the known correct answer, optimizing weights using calculus and backpropagation.
-
Primitives Progression (Modes 1-9)
150s
The talk progresses through nine scenarios: simple completion $ ightarrow$ structured output (JSON for control flow) $ ightarrow$ chat context (`thread` object) $ ightarrow$ tool calling/function calling $ ightarrow$ agentic loop $ ightarrow$ guardrails $ ightarrow$ bindings $ ightarrow$ steering $ ightarrow$ composition workflow. Each step builds upon the last, increasing system complexity and reliability.
-
Context Management
2400s
The 'thread' (or message array) is a critical data structure that maintains conversation history and state for the LLM. Context can be managed via caching layers to improve speed, but context window length remains an engineering constraint.
-
Tool Calling Mechanism
2050s
The model suggests a function call by returning JSON structured like a function signature (e.g., `fetch(query)`). The actual execution is handled entirely by the external runtime, which parses the tool call and executes the corresponding bound function/delegate.
Mentioned resources
- Prompty
- Seth Juarez Draft Flow Repo
Channel & topics
Watch on YouTube · Back to latest
This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.