WhoBuilt

The Unreasonable Effectiveness of Separating the Task from the Model

Jul 23, 2026· 17 min· 6.2K views·Watch on YouTube

Speakers

Maxime Rivest and Isaac Miller, DSPy contributors, explain how AI Engineer’s DSPy project separates task definitions from model implementations and how teams can optimize them.

Treat AI tasks like reusable functions

Rivest argues that repeated AI tasks should have clear input and output contracts, like ordinary functions. DSPy, an open-source Python project, lets developers reuse and compose AI programs while changing their internal implementation without changing how other code calls them. His examples include extracting tax values from farm invoices and correcting grammar from a keyboard shortcut.

Specify the task with instructions, code, and examples

Rivest says a useful task definition includes instructions for what should happen, code for requirements that must always hold, and evaluations that describe what good looks like. In his invoice example, the program retries tax extraction with more reasoning when needed and rejects negative values. Examples help capture subtle expectations that are hard to express as instructions or code alone.

Optimize implementations against the task

Once a task has specifications, constraints, and evaluations, developers can compare and optimize implementations while keeping the interface fixed. Rivest describes DSPy’s progression from selecting few-shot examples to optimizing instructions, with the longer-term aim of automating more implementation choices. Miller cites Shopify as an example of switching to a cheaper model while retaining the same evaluations and business logic, reporting a 550-fold cost reduction.

Try new techniques without changing the interface

Miller says DSPy makes research techniques available as implementation options, while teams still need to test whether each one helps their own task. He describes Recursive Language Models for some long-context programs and introduces DSPy Flex, which can learn a custom harness for a function. He also discusses qualitative learning as a research question: using production traces, user actions, analytics, and other textual feedback to help refine evaluations.

Use feedback to solve last-mile problems

Miller argues that even a highly capable model needs task-specific context and feedback to solve a company’s particular problems. Rivest emphasizes evaluating new techniques against business needs with data, rather than assuming they will help. They encourage attendees to use and contribute techniques to DSPy’s open-source community.

Takeaways

  • Define stable inputs and outputs for repeated AI tasks so you can change the implementation without rewriting integrations.
  • Separate natural-language instructions, code-enforced requirements, and evaluations that describe successful results.
  • Keep evaluations fixed while comparing models and techniques, and measure cost and quality on your own task.
  • Use production feedback to improve evaluations, while treating qualitative learning as an active research direction.
  • Test new research techniques against a specific business problem before adopting them.

Mentioned in this talk

Search inside this talk

What was claimed 6

  • feature
    DSPy: Open-source Python software that brings reusable, composable, testable, and optimizable function-like properties to AI programs
    “DSPy is open-source software in Python that lets you bring these properties to your AI workflows and AI programs.”
    YouTube
    Unverified1 source· Talk
  • feature
    DSPy: Supports task specification through instructions, code constraints, and evaluations
    “You have the specs, the code, and the evals.”
    YouTube
    Unverified1 source· Talk
  • metric
    Shopify: 550 times cheaper
    “Shopify: 550 times cheaper.”
    YouTube
    Unverified1 source· Talk
  • feature
    DSPy: DSPy Flex can learn a custom harness to implement a function
    “you can actually learn a harness over time to solve that function.”
    YouTube
    Unverified1 source· Talk
  • feature
    qualitative learning: Can use textual feedback from production to iteratively refine evaluations
    “the model can iteratively refine the hill over time”
    YouTube
    Unverified1 source· Talk
  • feature
    DSPy: Open source and open research
    “We're completely open source, open research”
    YouTube
    Unverified1 source· Talk

Related talks