Reference Resolution Across Turns
What you'll learn: How chatbots correctly interpret pronouns and references that point back to earlier parts of the conversation.
The Challenge of Conversational References
When humans chat, we constantly use shorthand like "it," "that," "they," or "the last one" to refer to things mentioned earlier. Your chatbot needs to do the same detective work—figuring out what these words point to by looking back through the conversation history.
Imagine this exchange:
- User: "Tell me about the Eiffel Tower."
- Bot: "The Eiffel Tower is an iron lattice tower in Paris..."
- User: "How tall is it?"
The word "it" has no meaning in isolation. The bot must resolve that reference by connecting it to "the Eiffel Tower" from earlier messages.
How It Works
Reference resolution relies on the message history you've been maintaining. When the model receives a new user message containing a pronoun or vague reference, it examines the conversation context to determine what entity is being discussed.
The LLM naturally performs much of this work when you include prior messages in the prompt. It uses pattern matching and semantic understanding to link references to their antecedents (the original nouns they refer to).
Key patterns the model resolves:
- Pronouns: "it," "they," "them," "this," "that"
- Implicit references: "the first one," "your earlier suggestion"
- Ellipsis: "What about Paris?" (after discussing cities)
Why Message History Matters
Without conversation history, every pronoun becomes ambiguous. This is why Conversation State vs Message History (lesson 742) and proper Message History Formats (lesson 736) are foundational—they give the model the raw material needed for resolution.
Key Takeaway: Reference resolution lets chatbots understand pronouns and vague references by analyzing conversation history, enabling natural multi-turn dialogue where users don't need to repeat context constantly.