Question bank
Interview Questions — LangChain, LangGraph and LangSmith
81 questionsWhat the provenance labels mean
In this bank
Round: GenAI/LLM depth (required) · GenAI system design (required) · coding (live-coding prompts at the end) · agent-platform roles Provenance: every section below is labelled Common industry pattern (topics that recur in agent-framework discussions) or Generated practice. None is verified as asked by a named company. Product and API names follow the LangChain, LangGraph and LangSmith docs read on 2026-10-21 (version 1.x). Names move: say which version you last read, and check your pinned version before quoting an exact name. Priority: ★★★ expect it · ★★ common · ★ a differentiator for senior or platform roles. These stars are our judgment, not data. How to use: answer aloud for 60 to 90 seconds, then compare with the key points. The lessons are in the LangChain ecosystem module, and the drills are in LangChain ecosystem: interview drills Open the course to learn this.
A. The map and LangChain core
Provenance: Common industry pattern. Teaching: The LangChain map and Runnables Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| A1 | ★★★ | How do LangChain, LangGraph and LangSmith relate?Label: Common industry pattern | LangChain: common model interface and create_agent. LangGraph: the stateful runtime LangChain agents are built on. LangSmith: tracing, evaluation and deployment for any framework. | Can you use LangSmith without LangChain? |
| A2 | ★★★ | What changed in LangChain 1.0?Label: Common industry pattern | create_agent replaces create_react_agent; middleware; structured output from the main loop; content_blocks; legacy chains and retrievers moved to langchain-classic. | How would you migrate older code? |
| A3 | ★★★ | What is a Runnable, and what does composing them give you?Label: Common industry pattern | A shared interface (invoke, batch, stream, async); a pipe runs in sequence, a dict runs branches in parallel; streaming, async and batching from one definition, and tracing. | What does it not give you? |
| A4 | ★★★ | When is a pipe chain the wrong tool?Label: Common industry pattern | Loops, branching on state, waiting for a person, resuming after a crash: use a graph. A one- or two-step call: plain code. | Show a retry-until-valid loop. |
| A5 | ★★ | with_structured_output or response_format?Label: Common industry pattern | The first on a bare model, with options to return the raw reply and parse error. The second in an agent, via provider or tool strategy, result under structured_response. | What happens when the output is cut off? |
| A6 | ★★ | How does tool calling work end to end?Label: Common industry pattern | Schema from docstring and type hints; the model returns tool calls with ids; you run them and return tool messages with the same id; the model continues. | What breaks if an id is missing? |
| A7 | ★★ | How do you pass user identity to a tool safely?Label: Common industry pattern | Inject it from the authenticated context through the hidden runtime parameter; never a model-visible argument; check ownership inside the tool. | What attack does a model-supplied id allow? |
| A8 | ★★ | Make a model call resilient.Label: Common industry pattern | Timeouts, retries with backoff for transient errors, fallback models, rate limits, caching only deterministic calls. | What can a fallback model silently change? |
| A9 | ★★ | Two-step RAG or agentic RAG?Label: Common industry pattern | Always retrieve then answer (predictable latency) versus retrieval as a tool (flexible, variable cost); hybrid adds rewriting and checks. | Which for a legal-research assistant? |
| A10 | ★★ | Why does it matter that a retriever is a Runnable?Label: Common industry pattern | It composes in a chain, is traced, and can be wrapped as a tool. | How do you add a per-tenant filter? |
| A11 | ★★ | Why are the old memory classes discouraged?Label: Common industry pattern | History is state kept by a checkpointer per thread; long-term memory is a store; trimming and summarising are middleware. | Where did the old classes go? |
| A12 | ★ | Critique LangChain honestly.Label: Common industry pattern | Abstraction overhead, a history of API changes, debugging cost, vendor features arriving late; mitigated by a narrower 1.x scope and by using the SDK for simple calls. | When would you drop it? |
| A13 | ★ | LangChain, a plain SDK, another agent framework or a workflow engine?Label: Common industry pattern | Portability and a resumable runtime versus transparency versus ergonomics versus proven durable execution. | What is your decision rule? |
B. Agents and middleware
Provenance: Common industry pattern. Teaching: Agents, middleware and memory Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| B1 | ★★★ | What is the agent loop?Label: Common industry pattern | Call the model, run requested tools, add results, repeat until it asks for none or a limit stops it. | What stops it? |
| B2 | ★★★ | What is create_agent built on, and why does it matter?Label: Common industry pattern | LangGraph, so persistence, streaming and approvals are available. | How would you go beyond middleware? |
| B3 | ★★★ | Which middleware hooks exist?Label: Common industry pattern | before_agent, before_model, wrap_model_call, wrap_tool_call, after_model, after_agent. | Does order matter? |
| B4 | ★★ | Name built-in middleware and a use for each.Label: Common industry pattern | Call limits, retries, fallback, summarising, context editing, human approval, PII handling, tool selection, to-do list. | Which would you enable by default? |
| B5 | ★★ | Implement refund approval in an agent.Label: Common industry pattern | The human-in-the-loop middleware on that tool, a checkpointer and a thread id; approve, edit or reject. | What if there is no checkpointer? |
| B6 | ★★ | What are the four places an agent keeps information?Label: Common industry pattern | State, short-term memory (checkpointer and thread), runtime context, long-term store. | Which survives across threads? |
| B7 | ★★ | Control cost and loops in an agent.Label: Common industry pattern | Model and tool call limits, a recursion limit, timeouts, cheap-model routing, summarising, trimming tool output, per-tenant budgets. | Which gives the hardest guarantee? |
| B8 | ★★ | Dynamic model selection.Label: Common industry pattern | A wrap-model hook swaps the model per request; evaluate the router. | What is the risk of misrouting? |
| B9 | ★★ | Too many tools hurt accuracy. Fixes?Label: Common industry pattern | Tool selection middleware, routing to specialists, clearer descriptions, loading on demand. | How do you measure the effect? |
| B10 | ★★ | Name the multi-agent patterns and their costs.Label: Common industry pattern | Subagents (extra call), handoffs (sequential), skills (loaded text stays), router (stateless call each time), custom workflow (more code). | When do you add a second agent? |
| B11 | ★ | What is Deep Agents?Label: Common industry pattern | A packaged harness on LangGraph: planning, subagents, filesystem tools, context management. | When is it overkill? |
| B12 | ★ | How do you test an agent?Label: Common industry pattern | A scripted fake model; unit tests for tools and middleware; trajectory and answer evaluations; repeated runs for variance. | How do you test non-determinism? |
C. LangGraph core
Provenance: Common industry pattern. Teaching: LangGraph: state, nodes, edges and control flow Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| C1 | ★★★ | Explain state, nodes and edges.Label: Common industry pattern | Shared typed state; nodes return partial updates; edges are fixed, conditional or dynamic; compile before use. | Why partial updates? |
| C2 | ★★★ | What is a reducer and why is one needed?Label: Common industry pattern | The merge rule for a key; default replace; parallel writes need one; the message reducer appends or updates by id. | What happens without one on a parallel write? |
| C3 | ★★★ | Super-steps and parallelism.Label: Common industry pattern | Active nodes run in parallel on the same state; updates merge at the boundary; ends when none is active or at the recursion limit. | Can siblings see each other’s updates? |
| C4 | ★★★ | Build generate, validate, retry at most three times.Label: Common industry pattern | A counter in state, a conditional edge back, a cap, then a fallback or a person. | Where is the safety bound? |
| C5 | ★★ | Command or a conditional edge?Label: Common industry pattern | Command updates and routes in one return; a conditional edge only routes. A parent target exists for subgraph handoffs. | What if a static edge also leaves the node? |
| C6 | ★★ | What is Send for?Label: Common industry pattern | Dynamic fan-out where each item has its own input and the count is known at run time; a reducer gathers results. | How do you wait for all branches? |
| C7 | ★★ | The recursion limit.Label: Common industry pattern | Maximum super-steps, then an error; set it in the top-level run config; the docs give 1000 as the default from 1.0.6; set it on purpose. | What is the right value? |
| C8 | ★★ | Graph API or functional API?Label: Common industry pattern | Visible topology and shared state versus imperative code with durability added; same core capabilities. | When do you choose which? |
| C9 | ★★ | Node retry and caching.Label: Common industry pattern | A retry policy on chosen exceptions; a cache policy with a time to live, enabled at compile time. | Why must nodes be safe to repeat? |
| C10 | ★ | Input, output and private state.Label: Common industry pattern | Separate schemas narrow the interface; private keys let nodes talk internally. | What is a use case? |
| C11 | ★ | Design state for a long research agent.Label: Common industry pattern | Small and serialisable, references to artefacts, reducers for findings, a schema version. | What breaks on a schema change? |
| C12 | ★ | LangGraph or a workflow engine?Label: Common industry pattern | An agent-aware runtime with interrupts and streaming versus a general durable workflow engine; they can combine. | Which for a payment flow with one model step? |
D. Persistence, approvals and failure
Provenance: Common industry pattern. Teaching: LangGraph: persistence, human approval and failure Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| D1 | ★★★ | Checkpointer versus store.Label: Common industry pattern | Thread-scoped snapshots versus a cross-thread store with namespaces and optional semantic search. | Which one enables time travel? |
| D2 | ★★★ | How does interrupt work?Label: Common industry pattern | It saves state and returns a payload; resume on the same thread with a resume command; the node restarts from its top and the call returns the value. | What are the consequences? |
| D3 | ★★★ | Rules for safe interrupts.Label: Common industry pattern | Idempotent code before the call, no bare try-except, stable order, JSON payload, a checkpointer and thread id, no while-true loop. | Debug a double charge. |
| D4 | ★★ | Which checkpointer in production, and what must you operate?Label: Common industry pattern | A database-backed one; pruning, connection pooling, serialisation, migrations, thread-access checks. | Why not the in-memory saver? |
| D5 | ★★ | Replay versus fork.Label: Common industry pattern | Replay re-runs nodes after a checkpoint (model calls and effects repeat); fork edits state and branches, leaving history intact. | Name a use for each. |
| D6 | ★★ | Which stream modes exist and when to use each?Label: Common industry pattern | Updates for progress, messages for tokens, custom for your own events, values for full state. | Chat versus a long tool-heavy run? |
| D7 | ★★ | Subgraphs.Label: Common industry pattern | A graph as a node or called inside a node; state mapping; a parent may not see changes at once. | What pitfalls come with them? |
| D8 | ★★ | Implement a handoff.Label: Common industry pattern | A tool returns a command naming the next agent, aimed at the parent; pass a summary, not the transcript. | How do you prevent ping-pong loops? |
| D9 | ★★ | Design long-term memory.Label: Common industry pattern | Namespaces per user, a write policy, retrieval, correction and deletion, evaluation. | What do you not store? |
| D10 | ★ | Delivery semantics of a graph.Label: Common industry pattern | State is saved at step boundaries, so outside effects are at least once; use idempotency keys. | What about parallel branches that fail? |
| D11 | ★ | Durability modes.Label: Common industry pattern | Save on exit, in the background or before the next step; speed against recovery. | Which for approvals? |
E. LangSmith: tracing and evaluation
Provenance: Common industry pattern. Teaching: LangSmith: tracing, datasets and evaluation Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| E1 | ★★★ | Run, trace, thread, project.Label: Common industry pattern | A unit of work; the runs of one operation; the traces of one conversation; a container per application. | How do you add metadata? |
| E2 | ★★★ | Enable tracing and instrument a non-LangChain app.Label: Common industry pattern | The tracing and API-key variables, an optional project; a decorator or context manager for other code. | How do you trace a serverless function? |
| E3 | ★★★ | From a bad-answer report to a regression test.Label: Common industry pattern | Find the trace, check run inputs, classify, reproduce, add to a dataset, run an experiment against the baseline, gate, release. | Where does production data become test data? |
| E4 | ★★★ | Offline versus online evaluation.Label: Common industry pattern | A curated dataset with references before release versus sampled live runs with no reference. | What can online checks not measure? |
| E5 | ★★ | Evaluator types and trade-offs.Label: Common industry pattern | Code, model judge, human, pairwise. | How do you calibrate a judge? |
| E6 | ★★ | Design evaluations for a RAG bot.Label: Common industry pattern | Dataset sources, retrieval and generation scored separately, slices, repeated runs, a CI threshold. | How do you handle unanswerable questions? |
| E7 | ★★ | Evaluate an agent.Label: Common industry pattern | Final answer plus trajectory (tool choice, order, redundant calls), state-based checks, repeated runs, cost and latency. | Which tools help? |
| E8 | ★★ | Privacy and tracing.Label: Common industry pattern | Hide inputs or outputs, anonymise by pattern, redact before sending, retention, region or self-hosting, access control. | What should never leave your network? |
| E9 | ★★ | A sampling strategy.Label: Common industry pattern | Sample ordinary traffic; keep errors, negative feedback and flagged tenants. | How do you keep the data flywheel balanced? |
| E10 | ★ | Why can a judge mislead?Label: Common industry pattern | Bias toward long or first answers, drift, leakage; calibrate on human labels, randomise order, use a stronger or different model. | Show an agreement metric. |
| E11 | ★ | Alternatives and lock-in.Label: Common industry pattern | Other platforms and OpenTelemetry backends; emit open formats and keep datasets exportable. | How do you choose? |
F. Deployment and production
Provenance: Common industry pattern. Teaching: LangSmith Deployment: running agents in production Open the course to learn this
| # | Priority | Question | Key points | Follow-up |
|---|---|---|---|---|
| F1 | ★★★ | Why not wrap the graph in a web endpoint?Label: Common industry pattern | Long runs, background execution, resumable streaming, pauses across days, schedules, queues, concurrency rules: you would rebuild a runtime. | When is building your own fine? |
| F2 | ★★ | Assistants, threads and runs.Label: Common industry pattern | A configured graph; a state container; one execution. | How do you model multi-tenancy? |
| F3 | ★★ | Double-texting strategies.Label: Common industry pattern | Enqueue (default), reject, interrupt, rollback; choose by what a half-done run costs. | Chat versus a form-filling agent? |
| F4 | ★★ | Hosting options.Label: Common industry pattern | Cloud, hybrid, self-hosted with a control plane, standalone, or build your own. | A bank with residency rules? |
| F5 | ★★ | Authorisation on an agent service.Label: Common industry pattern | Authenticate to an identity, thread ownership by metadata filter, store namespaces, identity into tools by context. | What is the risk with guessable thread ids? |
| F6 | ★★ | A production checklist.Label: Common industry pattern | Budgets, kill switch, idempotency, durable state, tracing with a redaction policy, evaluation gate, gradual release, runbooks. | What breaks first at ten times the traffic? |
| F7 | ★ | A deploy while runs are paused.Label: Common industry pattern | Durable state, compatible state shape, stable node names and interrupt order, idempotent effects. | What if a node was renamed? |
| F8 | ★ | Capacity planning.Label: Common industry pattern | Runs × steps × latency; workers on queue depth; database writes grow with steps × state size; provider rate limits. | Which resource saturates first? |
G. Scenarios and debugging
Provenance: Generated practice. Teaching: LangChain ecosystem: interview drills Open the course to learn this
| # | Priority | Scenario | Key points |
|---|---|---|---|
| G1 | ★★★ | The agent loops until it hits the limit.Label: Generated practice | Missing stop condition, a tool error the model cannot see, ambiguous tools, no call cap; read the last tool calls. |
| G2 | ★★★ | An approved refund went out twice.Label: Generated practice | A call before the interrupt, a duplicate resume, no idempotency key. |
| G3 | ★★ | A chat forgets turns in production only.Label: Generated practice | No checkpointer, a new thread id per request, or an in-memory saver behind several replicas. |
| G4 | ★★ | The bill doubled after a release.Label: Generated practice | A changed prompt prefix, summarising off, more calls, bigger chunks, retries; read tokens per run in traces. |
| G5 | ★★ | The evaluation says better and users say worse.Label: Generated practice | Judge bias, a stale dataset, a slice that got worse, latency, metric gaming. |
| G6 | ★★ | A tool returned another customer’s data.Label: Generated practice | A model-supplied id, no ownership check, a shared cache key, a store namespace bug. |
| G7 | ★ | A retrieved document triggers a send-email tool.Label: Generated practice | Untrusted content; approval on the irreversible tool; allow lists; no tools in the summariser; test with adversarial cases. |
| G8 | ★ | Migrate an older codebase with no downtime.Label: Generated practice | Pin versions, characterisation evaluations, port one chain at a time, compare traces, retire the bridge. |
H. System design prompts
Provenance: Generated practice. Teaching: LangChain ecosystem: interview drills Open the course to learn this
| # | Priority | Prompt | Key points |
|---|---|---|---|
| H1 | ★★★ | Design a support agent that can issue refunds.Label: Generated practice | The eight-part framework in the drills lesson: clarify, shape, state and memory, tools, guardrails, evaluation, deployment, failure modes. |
| H2 | ★★ | Design a research agent that writes a sourced brief in ten minutes.Label: Generated practice | A planner, Send workers, an append reducer, forced citations, budgets and deadlines, progress streaming, checkpoints, untrusted web pages. |
| H3 | ★★ | Design a code-review assistant for pull requests.Label: Generated practice | Parallel reviewers, deduplicate and rank, idempotent comment posting, false-positive rate as the key metric, past comments as an evaluation set. |
| H4 | ★ | Design a multi-tenant agent platform on a hosted runtime.Label: Generated practice | One graph, many assistants, per-tenant auth and namespaces, budgets, an evaluation gate, a deletion path. |
I. Project and behavioural angle
Provenance: Generated practice. See also Projects and behavioural questions.
| # | Priority | Question | Key points |
|---|---|---|---|
| I1 | ★★ | Tell me about an agent you built, and a time a step ran twice.Label: Generated practice | Use a real incident; name the side effect and the fix (a key, a check, an order); never invent figures. |
| I2 | ★ | How did you decide to use or avoid a framework?Label: Generated practice | The job first, the smallest part that does it, and the cost you accepted; show a case where you used none. |
Coding-round variants
- A tool-calling loop in a graph with one tool, a conditional edge, a recursion limit and a scripted fake model.
- Generate, validate, retry at most three times with a counter in state.
- A map-reduce summariser with
Sendand an append reducer. - An approval flow with an interrupt and a resume command, an idempotent action, and tests for approve and reject.
- A middleware that routes short prompts to a cheaper model and another that enforces a tool allowlist.
- An evaluation harness: ten examples, a code evaluator and a judge, comparing two prompts.
Study order (suggested)
- The ★★★ items in sections A to F: answer aloud, then compare.
- One scenario from G and one design prompt from H, timed.
- The ★★ items in the sections that match your next interview, then the ★ items.
Pair with Advanced, Scenario Based and the Top 100 priority questions.