liveBook · Manning

Context

As explained in Effective Conversational AI

Context is information about a user or interaction that a conversational system retains to interpret and manage the conversation.

A chatbot can answer a question correctly and still miss what the user needs. Asked which credit card to choose, a bank assistant might list generic options without considering the customer’s existing accounts or spending habits. The customer then has to search elsewhere or contact support. Context helps an assistant give a response that fits the person and the situation. section 9.1

Context is information available about a user or interaction that helps the assistant interpret a request and decide what to do next. It can come from a backend system, information supplied during the conversation, or previous interactions. Useful signals include location, time zone, device type, preferences, behavioral patterns, and communication modality. Keep context current as the conversation changes; an old preference or an incomplete account picture may not answer today’s question. section 8.2.2 section 9.1.2 section 9.4

Remove a question without skipping verification

Without context, a phone assistant asks how to find an account, then asks the caller to recite a phone number. If caller ID provides a possible match, it can instead ask, “Would you like to use the phone number you’re calling from?” After confirmation, it proceeds to the verification passcode. The saved questions reduce effort and opportunities for input failure; the passcode step remains. section 8.2.2

Use the context that changes the next response or step:

  • For an account-balance question, clarify which account the user means, then include relevant recent activity rather than assuming a single balance tells the whole story. section 9.1.1
  • For “Where is the nearest ATM?”, use the user’s location to offer nearby options; for scheduling across cities, account for the user’s time zone. section 9.1.2
  • For a shopping request, previous searches or preferences can guide an adaptive flow instead of restarting with the same generic product categories. section 9.3.1

Context can also guide a language model through its prompt. Trusted documents supplied through retrieval-augmented generation (RAG) can reduce reliance on the model’s own stale information, while user history can help an adaptive flow tailor its reply. Neither is a guarantee of accuracy: check that generated answers remain grounded and appropriate as the conversation evolves. Adding historical awareness may require development because providers do not necessarily supply it by default. Handle sensitive data carefully: obtain and maintain consent for location use, store it securely, and delete it when no longer needed. section 1.2.2 section 9.1.1 section 9.1.2 section 9.4

Table 9.2 Example interactions with non-contextual, contextual, and personalized responses
User query: How should I manage my expenses this month?
Non-contextualized response
Ensure you track your expenses and stay within a budget. Consider using financial tracking tools to help manage your spending.
Contextualized response for a frequent traveler
Since you travel frequently, consider investing in a credit card that offers travel rewards. You should also look into travel budgets for each trip and explore saving options on frequent flyer programs to optimize your travel-related expenses this month.
Contextualized response for a recent graduate starting a new job
Congratulations on your new job! As you transition into financial independence, it’s important to set up a budget, considering your new income. You might want to allocate funds for upcoming one-time expenses, such as professional attire or a commuting pass, while also starting an emergency fund.

Compare a generic expense-management answer with replies tailored to two different user situations; the same question need not lead to the same advice. section 9.1.1

How Effective Conversational AI covers it

How deep it goes
Defines contextual information through worked interactions and design guidance, while noting that historical awareness needs additional development rather than detailing its implementation.
Examples
Contrasts generic banking advice with account-aware help, and a caller’s repeated account lookup questions with caller-ID-assisted confirmation.
What it assumes
Assumes familiarity with chatbot interactions but defines contextual information through everyday user scenarios without requiring implementation code.
What you can do after
Apply it by using known information to shorten flows and tailor replies, while checking accuracy and protecting location data.
How it connects
Connects context to adaptive conversational flows, communication modality, prompt design, and retrieval-augmented generation.

Also explained in

Compare how 18 books explain context →

Related concepts

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