next
Round
Technologies
Saved
Summary
Login
next
Round
Technologies
Saved
Summary
Login
Question Loading...
Messages
1. What is a Message in LangChain and how does it differ from a plain string prompt?
Level: Expert | Frequency: High
2. What are the core message types in LangChain — HumanMessage, AIMessage, SystemMessage, ToolMessage, FunctionMessage — and when do you use each?
Level: Expert | Frequency: High
3. What is the difference between SystemMessage and HumanMessage — how does the LLM treat them differently under the hood?
Level: Expert | Frequency: High
4. What is a BaseMessage and why does LangChain model all messages as objects instead of raw strings?
Level: Expert | Frequency: High
5. What is the content field in a message and why can it be either a string or an array of content blocks?
Level: Expert | Frequency: High
6. What is a multimodal message and how do you pass images or file data inside a message content block?
Level: Expert | Frequency: High
7. How do you construct a conversation history as a BaseMessage[] array and pass it correctly to a Chat Model?
Level: Expert | Frequency: High
8. What is MessagePlaceholder in a ChatPromptTemplate and how does it let you inject dynamic message history into a prompt?
Level: Expert | Frequency: High
9. How does AIMessage carry tool call requests and how does ToolMessage carry the result back — walk through the full round trip?
Level: Expert | Frequency: High
10. What is the difference between AIMessage.tool_calls and AIMessage.additional_kwargs.function_call — why do both exist?
Level: Expert | Frequency: High
11. How do you trim messages to stay within the LLM's context window without losing important conversation context?
Level: Expert | Frequency: High
12. How do you filter messages by type (e.g. only keep HumanMessages) using LangChain's built-in message utilities?
Level: Expert | Frequency: High
13. What is mergeMessageRuns() and when would you use it to preprocess a message list?
Level: Expert | Frequency: High
14. How do you convert LangChain messages to OpenAI's raw API format and back — when would you need to do this?
Level: Expert | Frequency: High
15. How does LangGraph's MessagesAnnotation work and why is it the recommended state shape for agent graphs?
Level: Expert | Frequency: High
16. How does the messages reducer in LangGraph handle message updates — why can you append, replace, or delete messages by ID?
Level: Expert | Frequency: High
17. How do you implement message deduplication in a LangGraph state to avoid the same message being added twice?
Level: Expert | Frequency: High
18. How do you implement a sliding window memory — keeping only the last N messages — without losing the system prompt?
Level: Expert | Frequency: High
19. How do you implement conversation summarization — replacing old messages with a summary message to save tokens?
Level: Expert | Frequency: High
20. How do you persist and restore a full message history across sessions using a checkpoint saver in LangGraph?
Level: Expert | Frequency: High
21. What is the difference between storing messages in MemorySaver vs an external store like Redis or PostgreSQL via a custom BaseCheckpointSaver?
Level: Expert | Frequency: High
22. How do you stream individual message chunks using AIMessageChunk and how do you aggregate them into a complete AIMessage?
Level: Expert | Frequency: High
23. What is RemoveMessage in LangGraph and how do you use it to surgically delete specific messages from agent state?
Level: Expert | Frequency: High
24. How do you attach custom metadata to a message (e.g. timestamps, user IDs, trace IDs) without breaking LLM compatibility?
Level: Expert | Frequency: High
25. How do you handle token counting per message — accounting for role overhead, tool schemas, and system prompt tokens — to accurately predict context usage?
Level: Expert | Frequency: High
26. How do you design a multi-tenant message store where conversation histories are isolated per user and per session?
Level: Expert | Frequency: High
27. How do you use LangSmith to inspect the exact message array sent to the LLM at every step of an agent run?
Level: Expert | Frequency: High
28. What are the security implications of injecting user-supplied content directly into a SystemMessage — how do you prevent prompt injection attacks?
Level: Expert | Frequency: High
29. Your agent is hitting the context window limit after 20 turns — what is your strategy to manage message history without losing critical context?
Level: Expert | Frequency: High
30. A user's message contains both text and an image — how do you construct the correct multimodal HumanMessage content block for a vision model?
Level: Expert | Frequency: High
31. You need to replay a past conversation from a database and continue it — how do you reconstruct the message state correctly in LangGraph?
Level: Expert | Frequency: High
32. Your LLM is returning inconsistent tool call formatting across providers (OpenAI vs Anthropic vs Gemini) — how do LangChain messages abstract this away?
Level: Expert | Frequency: High
All Topics
Basics
Agents
Models
Messages
Tools
Middleware
Memory
MCP
Multi Agents
RAG
Context Engineering
Human in the loop