This is the official repository for the paper "From what to respond to when to respond: Timely Response Generation for Open-domain Dialog Agents".
TIMER is a dialog agent that addresses the critical challenge of when to respond in open-domain conversations, going beyond traditional approaches that focus solely on what to respond.
Traditional dialog systems generate responses based on context, but they often ignore the temporal appropriateness of responses. For example, responding "Have you enjoyed your meal?" immediately after someone says "I'm having lunch with my friends." is inappropriate, whereas the same response becomes appropriate after 1 hour has elapsed.
Our approach enables TIMER to:
- Predict when to respond by estimating response timing (delay) between turns
- Generate what to respond that are contextually and temporally appropriate
- Maintain natural conversation flow while respecting temporal dynamics
TimelyChat is a large-scale dataset for timely response generation, featuring:
- 324 test examples with human-annotated temporal information
- 55,000+ multi-turn conversations for training
- 7.5 average turns per conversation
- Realistic time intervals ranging from minutes to hours
TimelyChat dataset is available on π€ HuggingFace Datasets Hub.
from datasets import load_dataset
dataset = load_dataset("seongbo/timelychat")TIMER-3B is a 3B parameter model for timely response generation that is:
- Built upon T5 architecture (seq2seq)
- Fine-tuned on the augmented training set of TimelyChat
- Capable of predicting response delay and generating time-conditioned responses
TIMER-3B is available on π€ HuggingFace Model Hub.
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("seongbo/timer-3b")
tokenizer = AutoTokenizer.from_pretrained("seongbo/timer-3b")-
Response Timing Prediction:
- Precision, Recall, F1, FPR (for binary intent classification)
- RMSLE (for time regression)
-
Timely Response Generation:
- BLEU-2
- ROUGE-L
- BERTScore
- Naturalness: How appropriate responses are to conversational context
- Time Specificity: How specific responses are to temporal context
- Coherence: How well agents maintain natural flow
- Delay Appropriateness: Whether agents pose delays with appropriate timing and amount of time
- Time Specificity: How well agents generate responses that reflect temporal context
| Model | P β | R β | F1 β | FPR β | RMSLE β |
|---|---|---|---|---|---|
| Llama-3.1 8B | 17.2 | 69.1 | 27.6 | 60.6 | 2.853 |
| Llama-3.1 70B | 15.3 | 73.5 | 25.4 | 74.0 | 2.479 |
| GPT-3.5 | 14.3 | 78.4 | 24.1 | 86.1 | 2.763 |
| GPT-4o | 26.6 | 25.9 | 26.3 | 13.1 | 1.956 |
| TIMER-3B | 78.3 | 79.9 | 79.1 | 4.1 | 1.189 |
| Model | BLEU-2 | ROUGE-L | BERTScore | Naturalness | Time Specificity |
|---|---|---|---|---|---|
| Llama-3.1 8B | 5.38 | 12.38 | 86.21 | 2.24 | 2.78 |
| Llama-3.1 70B | 6.84 | 12.71 | 85.90 | 2.86 | 2.35 |
| GPT-3.5 | 9.97 | 17.13 | 87.54 | 4.26 | 2.86 |
| GPT-4o | 9.17 | 16.76 | 87.35 | 4.75 | 3.09 |
| TIMER-3B | 16.08 | 22.26 | 88.74 | 3.84 | 3.36 |
| Model | Coherence | Delay Appropriateness | Time Specificity |
|---|---|---|---|
| Llama 3.1 8B | 2.97 | 2.38 | 2.30 |
| Llama 3.1 70B | 3.29 | 2.50 | 2.35 |
| GPT-3.5 | 3.17 | 1.86 | 1.13 |
| GPT-4o | 4.05 | 2.65 | 1.57 |
| TIMER-3B | 3.30 | 2.91 | 2.76 |
Head-to-head comparison of TIMER-3B vs. GPT-4o (Win: TIMER-3B wins)
| Metric | Win | Tie | Loss |
|---|---|---|---|
| Naturalness | 19% | 24% | 57% |
| Time Specificity | 54% | 24% | 22% |
| Metric | Win | Tie | Loss |
|---|---|---|---|
| Coherence | 21% | 18% | 61% |
| Delay Appropriateness | 40% | 23% | 37% |
| Time Specificity | 40% | 23% | 37% |
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtpython evaluate_turn-level.py --model-type hf \
--model-name seongbo/timer-3b \
--task time \
--icl-method zeroshot \
--save-results \
--do-incrementalpython evaluate_turn-level.py --model-type hf \
--model-name seongbo/timer-3b \
--task response \
--icl-method zeroshot \
--save-resultspython evaluate_dialog-level.py --model-type hf \
--model-name seongbo/timer-3b \
--simulator gpt-4o \
--num-turns 10python laaj.py --task turn-level --model-name seongbo/timer-3bTBA
