AI Agent Frameworks / Quiz

Testing Chains with Fake LLMs

FakeListChatModel returns scripted answers: free, instant, deterministic. Know exactly what that buys you, and what it can never tell you.

Difficulty
Medium
Format
Quiz
Points
150
Estimate
9 min

// MISSION BRIEF

Your Mission

LangChain ships fake models for testing: FakeListLLM and FakeListChatModel return scripted responses in order, no network, no bill. They turn chain plumbing into normal unit-testable code, IF you know which layer they validate.

Scoring: equal weight per question.

// FIRST CONTACT

Battle teaser

FakeListChatModel(responses=["yes", "no"]) behaves how in a chain?

  1. AIt answers randomly between yes and no
  2. BIt calls a smaller, cheaper real model
  3. CIt throws unless run against the API
  4. DIt returns the scripted responses in order on successive calls, with no network access and full determinism
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

langchainfake-llmunit-testingai-agents