AI / LangGraph LangChain Interview questions
What are the key components of LangChain?
LangChain is organised around six core abstractions that cover the full lifecycle of an LLM application:
- Models — A unified interface to LLMs (text-in/text-out) and Chat Models (message-in/message-out), as well as Embedding models for vector representations. Supported providers include OpenAI, Anthropic, Google, Cohere, and dozens of open-source models.
- Prompts —
PromptTemplateandChatPromptTemplateformat inputs before they reach a model. They support variable substitution, partial templates, and few-shot examples. - Chains — Sequences of operations that combine prompts, models, retrievers, and tools. LCEL is the modern way to compose them using the
|operator. - Agents — Systems where an LLM decides which tools to call and in what order by reasoning through a ReAct (Reason + Act) loop until it reaches a final answer.
- Memory — Mechanisms to persist state between calls in a conversation: buffer memory stores the full history, summary memory compresses it, window memory keeps the last N turns.
- Tools & Toolkits — Functions that agents can call: web search, code execution, database queries, REST APIs, and custom business logic. Toolkits bundle related tools together (e.g., SQLDatabaseToolkit, GitHubToolkit).
Additionally, Document Loaders ingest data from PDFs, websites, CSVs, and databases; Text Splitters chunk documents for vector indexing; and Vector Stores (FAISS, Chroma, Pinecone) enable semantic search that feeds into Retrieval-Augmented Generation (RAG) pipelines.
More Related questions...