skip to content

LangChain

You will learn the framework that popularised LLM application plumbing: prompts, model wrappers, memory, retrievers, tools, and the LCEL Runnable model that composes them. Interviewers ask about LangChain because it is the shared vocabulary for these apps, and they want to hear where its abstractions earn their keep and where you would drop to a raw client.

part ofAI agent & RAG frameworksoverview, primer and where to startread it →
on this pageshow

explore

questions

page 2 of 2

How does LangChain's EnsembleRetriever combine BM25 and vector search results?

level: seniorimportance: should knowfreq 44%

basics

~20 s

By reciprocal rank fusion, not by score arithmetic. EnsembleRetriever runs each wrapped retriever, converts every result to its rank position, sums weight divided by (c + rank) across retrievers, and returns the deduplicated candidates ordered by that fused score.

open as a page

In LangChain, what does MultiQueryRetriever buy you, and what does it cost?

level: seniorimportance: should knowfreq 50%

basics

~20 s

MultiQueryRetriever asks an LLM to rewrite the question into several phrasings, runs the base retriever on each, and returns the deduplicated union. It buys recall against vocabulary mismatch; it costs one extra LLM call of latency and a larger, unranked document set.

open as a page

When would you ship a fixed LangChain pipeline instead of create_agent?

level: principalimportance: should knowfreq 45%

basics

~20 s

Use a fixed pipeline whenever the sequence of steps is known before the request arrives. An agent spends model calls deciding what you already know, adds latency variance and non-determinism, and makes evaluation and incident response markedly harder.

open as a page

When does an LCEL chain stop being the right abstraction for a workflow?

level: principalimportance: should knowfreq 36%

basics

~10 s

When the workflow needs cycles, durable state between turns, mid-run human approval, or per-step recovery. LCEL composes a directed, stateless pipeline; those requirements need a graph runtime with checkpointing, or plain imperative code.

open as a page

How do you choose where LangChain conversation history lives for a multi-replica service?

level: principalimportance: should knowfreq 40%

basics

~20 s

Treat the get_session_history factory as the seam and pick the backend from the requirements behind it: latency and TTL push toward a cache, durability and audit toward a database. Key by authenticated user plus conversation, bound each read, and set retention and deletion policy alongside.

open as a page

How would you structure model selection across providers in a LangChain service?

level: principalimportance: should knowfreq 34%

basics

~20 s

Construct models from configuration with init_chat_model rather than importing provider classes at call sites, keep a small set of named tiers per task, and gate any switch behind evaluation — because capability differences leak through the shared interface even when the code compiles.

open as a page

showing 31–36 of 36