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

#PriorityQuestionKey pointsFollow-up
A1★★★How do LangChain, LangGraph and LangSmith relate?Label: Common industry patternLangChain: 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 patterncreate_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 patternA 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 patternLoops, 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 patternThe 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 patternSchema 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 patternInject 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 patternTimeouts, 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 patternAlways 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 patternIt 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 patternHistory 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 patternAbstraction 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 patternPortability 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

#PriorityQuestionKey pointsFollow-up
B1★★★What is the agent loop?Label: Common industry patternCall 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 patternLangGraph, so persistence, streaming and approvals are available.How would you go beyond middleware?
B3★★★Which middleware hooks exist?Label: Common industry patternbefore_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 patternCall 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 patternThe 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 patternState, 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 patternModel 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 patternA 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 patternTool 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 patternSubagents (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 patternA packaged harness on LangGraph: planning, subagents, filesystem tools, context management.When is it overkill?
B12★How do you test an agent?Label: Common industry patternA 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

#PriorityQuestionKey pointsFollow-up
C1★★★Explain state, nodes and edges.Label: Common industry patternShared 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 patternThe 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 patternActive 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 patternA 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 patternCommand 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 patternDynamic 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 patternMaximum 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 patternVisible 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 patternA 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 patternSeparate 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 patternSmall 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 patternAn 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

#PriorityQuestionKey pointsFollow-up
D1★★★Checkpointer versus store.Label: Common industry patternThread-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 patternIt 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 patternIdempotent 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 patternA database-backed one; pruning, connection pooling, serialisation, migrations, thread-access checks.Why not the in-memory saver?
D5★★Replay versus fork.Label: Common industry patternReplay 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 patternUpdates 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 patternA 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 patternA 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 patternNamespaces per user, a write policy, retrieval, correction and deletion, evaluation.What do you not store?
D10★Delivery semantics of a graph.Label: Common industry patternState 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 patternSave 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

#PriorityQuestionKey pointsFollow-up
E1★★★Run, trace, thread, project.Label: Common industry patternA 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 patternThe 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 patternFind 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 patternA 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 patternCode, model judge, human, pairwise.How do you calibrate a judge?
E6★★Design evaluations for a RAG bot.Label: Common industry patternDataset 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 patternFinal 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 patternHide 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 patternSample 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 patternBias 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 patternOther 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

#PriorityQuestionKey pointsFollow-up
F1★★★Why not wrap the graph in a web endpoint?Label: Common industry patternLong 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 patternA configured graph; a state container; one execution.How do you model multi-tenancy?
F3★★Double-texting strategies.Label: Common industry patternEnqueue (default), reject, interrupt, rollback; choose by what a half-done run costs.Chat versus a form-filling agent?
F4★★Hosting options.Label: Common industry patternCloud, 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 patternAuthenticate 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 patternBudgets, 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 patternDurable state, compatible state shape, stable node names and interrupt order, idempotent effects.What if a node was renamed?
F8★Capacity planning.Label: Common industry patternRuns × 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

#PriorityScenarioKey points
G1★★★The agent loops until it hits the limit.Label: Generated practiceMissing 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 practiceA call before the interrupt, a duplicate resume, no idempotency key.
G3★★A chat forgets turns in production only.Label: Generated practiceNo checkpointer, a new thread id per request, or an in-memory saver behind several replicas.
G4★★The bill doubled after a release.Label: Generated practiceA 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 practiceJudge bias, a stale dataset, a slice that got worse, latency, metric gaming.
G6★★A tool returned another customer’s data.Label: Generated practiceA 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 practiceUntrusted 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 practicePin 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

#PriorityPromptKey points
H1★★★Design a support agent that can issue refunds.Label: Generated practiceThe 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 practiceA 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 practiceParallel 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 practiceOne 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.

#PriorityQuestionKey points
I1★★Tell me about an agent you built, and a time a step ran twice.Label: Generated practiceUse 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 practiceThe 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 Send and 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)

  1. The ★★★ items in sections A to F: answer aloud, then compare.
  2. One scenario from G and one design prompt from H, timed.
  3. The ★★ items in the sections that match your next interview, then the ★ items.

Pair with Advanced, Scenario Based and the Top 100 priority questions.