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?
- AIt answers randomly between yes and no
- BIt calls a smaller, cheaper real model
- CIt throws unless run against the API
- 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