Introduction
In the context of modern conversational AI, user experience is increasingly defined by the fluidity of interaction. This paper formalizes and investigates the task of "Chat-Ghosting"—the real-time prediction of a single, inline completion for a user's partially typed message. Unlike traditional Query Auto-Completion (QAC) found in search engines, which typically offers a vertical list of multiple suggestions, ghosting requires the system to commit to a single, high-confidence prediction displayed directly within the text input field.
Ghosting is a high-stakes feature: while accurate suggestions significantly reduce typing effort and cognitive load, incorrect or irrelevant suggestions can be intrusive and distracting. This study establishes a benchmark for this task by repurposing diverse dialog datasets and comparing traditional statistical approaches with modern neural language models.
Methodology
Model Architectures
The researchers evaluated three distinct categories of models to determine their efficacy in the ghosting task:
- Standard QAC Methods: The baseline is the Most Popular Completion (MPC), utilizing character-level tries. An enhanced version, MPC++, incorporates a suffix-trie to handle previously unseen prefixes by identifying word-level n-gram patterns.
- N-Gram Models: Query Blazer (QB), a generative system, uses subword-level n-gram language models to produce completions that may not exist verbatim in the training logs.
- Neural and Large Language Models (LLMs): The study fine-tuned T5 and GPT-2 architectures and evaluated the zero-shot performance of larger models, including Phi-2 (2.7B) and Mistral-7B.
Dynamic Early Stopping
A primary contribution of this work is the introduction of an entropy-based dynamic early stopping strategy. Because ghosting requires high precision, it is often better to provide a short, certain snippet than a long, speculative completion. By monitoring the entropy of the token probability distribution during generation, the system can halt the completion the moment confidence drops below a specific threshold, thereby prioritizing precision over length.
Experimental Setup
To simulate real-world chat conditions, the authors utilized four public dialog datasets, spanning human-to-human and human-to-bot interactions:
- DailyDialog (DD): Open-domain human conversations.
- DSTC7-Ubuntu (DU): Technical, domain-specific support logs.
- Open Assistant (OASST) & ShareGPT (SGPT): Human-bot interactions characterized by longer, more complex utterances.
Key Results and Discussion
The Seen vs. Unseen Performance Gap
The evaluation revealed a sharp divide in performance based on whether the prefix had been encountered during training. For "seen" prefixes, simple statistical tries (MPC) remain the most efficient and accurate. However, these methods fail entirely on the "long tail" of novel human conversation. For "unseen" prefixes, neural models—specifically fine-tuned T5 and Phi-2—demonstrated superior generalization, leveraging their understanding of syntax and semantics to provide meaningful completions.
Typing Effort Saved (TES)
The primary utility metric, Typing Effort Saved (TES), measures the percentage of characters a user does not have to type. Fine-tuned neural models, when combined with the dynamic early stopping truncation, provided the highest TES for unseen prefixes.
Latency and Production Viability
For a "type-ahead" experience, latency is a critical constraint. The study found that T5 and GPT-2 can generate suggestions within a 100-150ms window on a V100 GPU, making them suitable for production environments. Conversely, larger models like Mistral-7B exhibited latencies of 2-3 seconds, which is prohibitive for real-time ghosting.
Conclusion
This research demonstrates that while statistical methods are robust for frequent queries, neural models are essential for the diverse and unpredictable nature of chat. The proposed dynamic early stopping mechanism successfully balances the trade-off between suggestion length and precision. Future work will focus on distilling larger LLMs into low-latency architectures and exploring personalization techniques to adapt to individual user typing behaviors.
Summary updated