Dialogue
Dialogue is an ordered exchange of related messages across successive turns between participants or an interactive system and its users.
AI Agents and Applications
A chat message history is an ordered collection of user and language-model messages representing a conversation.
- How it is used
- Provides prior exchanges as context so chatbots and agents can answer related follow-up questions.
- How deep it goes
- Builds a message-based RAG workflow and a checkpointed agent, then inspects restored state; only briefly addresses long-history compression.
- Examples
- Tests a Paestum follow-up about “they” and a Penzance weather follow-up about “the same town.”
- What you can do after
- Apply it via LangChain message history or LangGraph checkpoints to maintain and test conversational context across turns.
Effective Conversational AI
Chat history is the recorded sequence of messages exchanged during a user's conversational interactions.
- How it is used
- Uses recorded user–bot exchanges to diagnose frustrating interactions, measure understanding, and support handoff summaries.
- How deep it goes
- Details log sampling, exchange-level organization, and intent annotation; gives summary prerequisites without a transcript-system implementation.
- Examples
- Illustrates a repeated “yes” response, first-utterance sampling, and comparisons between annotated intent volumes and training examples.
- What you can do after
- Evaluate/understand chatbot failures and intent accuracy using sampled, human-annotated dialogues while recognizing when later turns matter.
Build AI-Enhanced Web Apps
An ordered record of messages exchanged during a conversation with a user or conversational system.
- How it is used
- Maintains visible exchanges and supplies earlier messages as context for follow-up queries.
- How deep it goes
- Works through interface, state, session retrieval, and conversation-memory patterns, while leaving storage integration to the developer.
- Examples
- Uses a scrollable chat interface, a LangChain.js follow-up query, and an interview assistant storing session messages in Redis.
- What you can do after
- Apply it via LangChain.js memory components to give follow-up queries earlier context; plan separate storage for persistent sessions.
Data Analysis with LLMs
A message history is an ordered collection of conversational messages representing an interaction with a chat model.
- How it is used
- Supplies current and prior messages as context for chat replies and records desired interactions for fine-tuning.
- How deep it goes
- Defines message lists, dictionaries, roles, and content, then shows a completion call and labeled training histories without examining model internals.
- Examples
- Uses a story request, ChatGPT follow-ups, and a movie review paired with the desired `neg` label.
- What you can do after
- Apply it via the OpenAI Python library to submit message histories, or build labeled histories for fine-tuning.
Starting Data Analytics with Generative AI and Python
An interaction pattern in which multiple successive user and assistant messages form a single contextual conversation.
- How it is used
- Carries earlier prompts and responses into API requests so follow-up questions have exchange context.
- How deep it goes
- Defines message roles and history, and notes that requests must supply context because past requests are not remembered.
- Examples
- Uses a Python API exchange about explaining resonance to children, followed by a question about where resonance is used.
- What you can do after
- Apply dialogue by sending a message array containing prior user and assistant turns with each API request.
Read how Starting Data Analytics with Generative AI and Python explains dialogue →
LLMs in Production
Chat history is the ordered record of messages exchanged during a conversational interaction.
- How it is used
- Supplies prior user prompts and assistant responses as context for new prompts in an interactive LLM application.
- How deep it goes
- Demonstrates storing and displaying turns in Streamlit, notes token limits, and points to summarization for compression.
- Examples
- Shows a Streamlit chatbot storing role-tagged messages in session state and displaying earlier turns.
- What you can do after
- Apply it via Streamlit by storing chat turns in session state and using the history to form a new prompt.
Build an AI Agent (From Scratch)
Conversation history is the accumulated sequence of prior messages retained for continuing an interaction with a language model.
- How it is used
- Maintains coherent interactions by resending prior messages or retrieving a session across agent runs.
- How deep it goes
- Implements message accumulation and session persistence, while identifying token growth as a cost and deferring efficient context management.
- Examples
- Demonstrates retaining a name across API calls and agent runs using a message list or session ID.
- What you can do after
- Apply continuity by resending prior messages or reusing a session ID across agent runs.
Read how Build an AI Agent (From Scratch) explains dialogue →
Grokking AI Applications
A record of earlier messages exchanged between a user and an agent or model.
- How it is used
- Preserves conversational context by forwarding earlier turns with each model request.
- How deep it goes
- Explains application-managed history and demonstrates list-based reinjection, without detailing storage or long-thread limitations.
- Examples
- Uses an Andrea name-recall exchange and a Python chat loop with history_lines.
- What you can do after
- Build it from scratch by appending turns and injecting the resulting history into successive prompts.
Building Reliable AI Systems
A record of the messages exchanged during a conversation.
- How it is used
- Retains session context so an agent can reuse user details instead of asking for them again.
- How deep it goes
- Describes lightweight session storage and gives a simple list-based implementation.
- Examples
- Uses support-chat details, troubleshooting context, and an order ID to illustrate reuse during a session.
- What you can do after
- Build it from scratch by appending messages to a list and returning the stored history.
Build Applications with Local AI Models on a Mac
The example chatbot's ordered exchange of messages between a user and an AI assistant.
- How it is used
- Demonstrates how a chatbot uses conversation history to respond across multiple turns.
- How deep it goes
- Explains that the script sends full history and runs in a loop, without detailing history storage or message construction.
- Examples
- Uses a chatbot exchange where the assistant recalls a name and recommends a beginner programming book.
- What you can do after
- Operate a looping chatbot and end the conversation by typing quit, exit, or bye.
Read how Build Applications with Local AI Models on a Mac explains dialogue →
Related concepts
- VectorStoreChatMemoryAdvisorused by · VectorStoreChatMemoryAdvisor is a Spring AI advisor that stores chat messages as embeddings in a vector store and retrieves relevant messages as conversational context.
- messagehas part · A message is a discrete unit of information or data represented, processed, or exchanged in a communication context.
- contextuses · Context is the surrounding information, state, or circumstances that condition how an entity, event, or task is interpreted or how a system behaves.
- conversational aiused by · Conversational AI is artificial intelligence that enables software systems to interact with users through natural-language dialogue.
- prompthas part · An input, typically containing instructions or context, supplied to an artificial-intelligence model to guide or elicit its output.
- memoryused by · Memory is a storage resource or mechanism that retains data or computational state for access during computation or later use.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.









