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.
The diagram traces a document-and-question prompt through an initial answer and a follow-up that refines it. section 6.1.1
