liveBook · Manning

Stateful session

As explained in AI Agents and Applications

A stateful session is an interaction session that retains prior exchanges and makes them available to later requests.

A stateful session lets a chatbot use earlier exchanges when answering a follow-up question. The conversation history is passed as additional context, so the user need not resend the original document. section 6.1.1

Refining an answer

After asking about temples in Paestum, a user asks who built them without pasting the document again. The chatbot answers using the earlier exchange. That convenience does not guarantee accuracy: it later answers a question absent from the document and gives an incorrect column count. section 6.1.1

Figure 6.1 The simple Q&A chatbot process involves the following: (1) the user sends a prompt containing a document (context) and a question to the chatbot, (2) the chatbot returns an initial answer, (3) the user follows up with a more detailed question, and (4) the chatbot provides a more accurate answer.
figure

The diagram traces a document-and-question prompt through an initial answer and a follow-up that refines it. section 6.1.1

How AI Agents and Applications covers it

How deep it goes
Defines the mechanism as passing conversation history as additional context, without specifying storage or implementation code.
Examples
Uses follow-up questions about Paestum’s temples, including an omitted detail and an incorrect column count.
What you can do after
Evaluate/understand it as a way to refine answers while checking whether claims come from the supplied document.
How it connects
Connects conversation history to chatbot question answering and document context.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents and Applications. The section links point to the parts of the book it draws on.