id stringlengths 16 26 | scenario stringclasses 8
values | messages listlengths 30 150 | token_budget int64 350 900 | token_count_estimate int64 417 2.54k | token_count_is_estimate bool 1
class | strategy stringclasses 3
values | pinned_message_ids listlengths 1 1 | protected_tool_groups listlengths 1 19 | evicted_message_ids listlengths 0 136 | retained_message_ids listlengths 14 51 | expected_behavior stringclasses 8
values | notes stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
coding-agent-001 | coding-agent | [
{
"id": "msg_coding-agent_0",
"role": "system",
"content": "You are a coding assistant. Follow the user's requirements and preserve important project constraints (the app uses JWTs with refresh tokens, not sessions).",
"pinned": true
},
{
"id": "msg_coding-agent_1",
"role": "assistant",
... | 800 | 464 | true | priority | [
"msg_coding-agent_0"
] | [
{
"call_id": "msg_coding-agent_13",
"result_id": "msg_coding-agent_14"
},
{
"call_id": "msg_coding-agent_25",
"result_id": "msg_coding-agent_26"
}
] | [] | [
"msg_coding-agent_0",
"msg_coding-agent_1",
"msg_coding-agent_2",
"msg_coding-agent_3",
"msg_coding-agent_4",
"msg_coding-agent_5",
"msg_coding-agent_6",
"msg_coding-agent_7",
"msg_coding-agent_8",
"msg_coding-agent_9",
"msg_coding-agent_10",
"msg_coding-agent_11",
"msg_coding-agent_12",
"... | Recent, high-priority implementation details (JWT/refresh-token decisions) survive; low-value filler acknowledgements are evicted first. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
coding-agent-002 | coding-agent | [
{
"id": "msg_coding-agent_0",
"role": "system",
"content": "You are a coding assistant. Follow the user's requirements and preserve important project constraints (the app uses JWTs with refresh tokens, not sessions).",
"pinned": true
},
{
"id": "msg_coding-agent_1",
"role": "user",
"... | 800 | 1,251 | true | priority | [
"msg_coding-agent_0"
] | [
{
"call_id": "msg_coding-agent_13",
"result_id": "msg_coding-agent_14"
},
{
"call_id": "msg_coding-agent_22",
"result_id": "msg_coding-agent_23"
},
{
"call_id": "msg_coding-agent_28",
"result_id": "msg_coding-agent_29"
},
{
"call_id": "msg_coding-agent_36",
"result_id": "... | [
"msg_coding-agent_1",
"msg_coding-agent_2",
"msg_coding-agent_4",
"msg_coding-agent_5",
"msg_coding-agent_6",
"msg_coding-agent_7",
"msg_coding-agent_9",
"msg_coding-agent_10",
"msg_coding-agent_11",
"msg_coding-agent_12",
"msg_coding-agent_15",
"msg_coding-agent_16",
"msg_coding-agent_17",
... | [
"msg_coding-agent_0",
"msg_coding-agent_3",
"msg_coding-agent_8",
"msg_coding-agent_13",
"msg_coding-agent_14",
"msg_coding-agent_19",
"msg_coding-agent_20",
"msg_coding-agent_22",
"msg_coding-agent_23",
"msg_coding-agent_24",
"msg_coding-agent_28",
"msg_coding-agent_29",
"msg_coding-agent_3... | Recent, high-priority implementation details (JWT/refresh-token decisions) survive; low-value filler acknowledgements are evicted first. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
coding-agent-003 | coding-agent | [
{
"id": "msg_coding-agent_0",
"role": "system",
"content": "You are a coding assistant. Follow the user's requirements and preserve important project constraints (the app uses JWTs with refresh tokens, not sessions).",
"pinned": true
},
{
"id": "msg_coding-agent_1",
"role": "user",
"... | 800 | 2,400 | true | priority | [
"msg_coding-agent_0"
] | [
{
"call_id": "msg_coding-agent_13",
"result_id": "msg_coding-agent_14"
},
{
"call_id": "msg_coding-agent_31",
"result_id": "msg_coding-agent_32"
},
{
"call_id": "msg_coding-agent_40",
"result_id": "msg_coding-agent_41"
},
{
"call_id": "msg_coding-agent_45",
"result_id": "... | [
"msg_coding-agent_2",
"msg_coding-agent_3",
"msg_coding-agent_4",
"msg_coding-agent_5",
"msg_coding-agent_7",
"msg_coding-agent_8",
"msg_coding-agent_9",
"msg_coding-agent_10",
"msg_coding-agent_11",
"msg_coding-agent_15",
"msg_coding-agent_16",
"msg_coding-agent_17",
"msg_coding-agent_19",
... | [
"msg_coding-agent_0",
"msg_coding-agent_1",
"msg_coding-agent_6",
"msg_coding-agent_12",
"msg_coding-agent_13",
"msg_coding-agent_14",
"msg_coding-agent_18",
"msg_coding-agent_26",
"msg_coding-agent_28",
"msg_coding-agent_37",
"msg_coding-agent_38",
"msg_coding-agent_42",
"msg_coding-agent_4... | Recent, high-priority implementation details (JWT/refresh-token decisions) survive; low-value filler acknowledgements are evicted first. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
customer-support-001 | customer-support | [
{
"id": "msg_customer-support_0",
"role": "system",
"content": "You are a support agent for Acme Cloud. Be concise, and never share account credentials in plain text.",
"pinned": true
},
{
"id": "msg_customer-support_1",
"role": "assistant",
"content": "Understood.",
"priority": ... | 500 | 430 | true | slidingWindow | [
"msg_customer-support_0"
] | [
{
"call_id": "msg_customer-support_10",
"result_id": "msg_customer-support_11"
},
{
"call_id": "msg_customer-support_14",
"result_id": "msg_customer-support_15"
},
{
"call_id": "msg_customer-support_18",
"result_id": "msg_customer-support_19"
}
] | [
"msg_customer-support_1",
"msg_customer-support_2",
"msg_customer-support_3",
"msg_customer-support_4",
"msg_customer-support_5",
"msg_customer-support_6",
"msg_customer-support_7",
"msg_customer-support_8",
"msg_customer-support_9",
"msg_customer-support_10",
"msg_customer-support_11",
"msg_c... | [
"msg_customer-support_0",
"msg_customer-support_17",
"msg_customer-support_18",
"msg_customer-support_19",
"msg_customer-support_20",
"msg_customer-support_21",
"msg_customer-support_22",
"msg_customer-support_23",
"msg_customer-support_24",
"msg_customer-support_25",
"msg_customer-support_26",
... | Recent useful context (the actual issue and its resolution) remains; repetitive greeting/filler turns are evicted. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
customer-support-002 | customer-support | [
{
"id": "msg_customer-support_0",
"role": "system",
"content": "You are a support agent for Acme Cloud. Be concise, and never share account credentials in plain text.",
"pinned": true
},
{
"id": "msg_customer-support_1",
"role": "user",
"content": "How long will the refund take to ap... | 500 | 1,143 | true | slidingWindow | [
"msg_customer-support_0"
] | [
{
"call_id": "msg_customer-support_6",
"result_id": "msg_customer-support_7"
},
{
"call_id": "msg_customer-support_9",
"result_id": "msg_customer-support_10"
},
{
"call_id": "msg_customer-support_19",
"result_id": "msg_customer-support_20"
},
{
"call_id": "msg_customer-suppor... | [
"msg_customer-support_1",
"msg_customer-support_2",
"msg_customer-support_3",
"msg_customer-support_4",
"msg_customer-support_5",
"msg_customer-support_6",
"msg_customer-support_7",
"msg_customer-support_8",
"msg_customer-support_9",
"msg_customer-support_10",
"msg_customer-support_11",
"msg_c... | [
"msg_customer-support_0",
"msg_customer-support_67",
"msg_customer-support_68",
"msg_customer-support_69",
"msg_customer-support_70",
"msg_customer-support_71",
"msg_customer-support_72",
"msg_customer-support_73",
"msg_customer-support_74",
"msg_customer-support_75",
"msg_customer-support_76",
... | Recent useful context (the actual issue and its resolution) remains; repetitive greeting/filler turns are evicted. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
customer-support-003 | customer-support | [
{
"id": "msg_customer-support_0",
"role": "system",
"content": "You are a support agent for Acme Cloud. Be concise, and never share account credentials in plain text.",
"pinned": true
},
{
"id": "msg_customer-support_1",
"role": "user",
"content": "Hi, I was double-charged on my last... | 500 | 2,216 | true | slidingWindow | [
"msg_customer-support_0"
] | [
{
"call_id": "msg_customer-support_5",
"result_id": "msg_customer-support_6"
},
{
"call_id": "msg_customer-support_11",
"result_id": "msg_customer-support_12"
},
{
"call_id": "msg_customer-support_32",
"result_id": "msg_customer-support_33"
},
{
"call_id": "msg_customer-suppo... | [
"msg_customer-support_1",
"msg_customer-support_2",
"msg_customer-support_3",
"msg_customer-support_4",
"msg_customer-support_5",
"msg_customer-support_6",
"msg_customer-support_7",
"msg_customer-support_8",
"msg_customer-support_9",
"msg_customer-support_10",
"msg_customer-support_11",
"msg_c... | [
"msg_customer-support_0",
"msg_customer-support_137",
"msg_customer-support_138",
"msg_customer-support_139",
"msg_customer-support_140",
"msg_customer-support_141",
"msg_customer-support_142",
"msg_customer-support_143",
"msg_customer-support_144",
"msg_customer-support_145",
"msg_customer-supp... | Recent useful context (the actual issue and its resolution) remains; repetitive greeting/filler turns are evicted. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
long-running-agent-001 | long-running-agent | [
{
"id": "msg_long-running-agent_0",
"role": "system",
"content": "You are a long-running autonomous agent. Track the current task state and never lose sight of the original objective.",
"pinned": true
},
{
"id": "msg_long-running-agent_1",
"role": "user",
"content": "Current objectiv... | 700 | 502 | true | priority | [
"msg_long-running-agent_0"
] | [
{
"call_id": "msg_long-running-agent_16",
"result_id": "msg_long-running-agent_17"
}
] | [] | [
"msg_long-running-agent_0",
"msg_long-running-agent_1",
"msg_long-running-agent_2",
"msg_long-running-agent_3",
"msg_long-running-agent_4",
"msg_long-running-agent_5",
"msg_long-running-agent_6",
"msg_long-running-agent_7",
"msg_long-running-agent_8",
"msg_long-running-agent_9",
"msg_long-runnin... | The current task-state messages survive across many turns; the original objective is never lost because it is high priority. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
long-running-agent-002 | long-running-agent | [
{
"id": "msg_long-running-agent_0",
"role": "system",
"content": "You are a long-running autonomous agent. Track the current task state and never lose sight of the original objective.",
"pinned": true
},
{
"id": "msg_long-running-agent_1",
"role": "user",
"content": "Reminder: the or... | 700 | 1,358 | true | priority | [
"msg_long-running-agent_0"
] | [
{
"call_id": "msg_long-running-agent_12",
"result_id": "msg_long-running-agent_13"
},
{
"call_id": "msg_long-running-agent_17",
"result_id": "msg_long-running-agent_18"
},
{
"call_id": "msg_long-running-agent_19",
"result_id": "msg_long-running-agent_20"
},
{
"call_id": "msg_... | [
"msg_long-running-agent_1",
"msg_long-running-agent_2",
"msg_long-running-agent_4",
"msg_long-running-agent_5",
"msg_long-running-agent_6",
"msg_long-running-agent_9",
"msg_long-running-agent_10",
"msg_long-running-agent_11",
"msg_long-running-agent_14",
"msg_long-running-agent_16",
"msg_long-ru... | [
"msg_long-running-agent_0",
"msg_long-running-agent_3",
"msg_long-running-agent_7",
"msg_long-running-agent_8",
"msg_long-running-agent_12",
"msg_long-running-agent_13",
"msg_long-running-agent_15",
"msg_long-running-agent_17",
"msg_long-running-agent_18",
"msg_long-running-agent_19",
"msg_long-... | The current task-state messages survive across many turns; the original objective is never lost because it is high priority. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
long-running-agent-003 | long-running-agent | [
{
"id": "msg_long-running-agent_0",
"role": "system",
"content": "You are a long-running autonomous agent. Track the current task state and never lose sight of the original objective.",
"pinned": true
},
{
"id": "msg_long-running-agent_1",
"role": "user",
"content": "Step 3 of 7 comp... | 700 | 2,500 | true | priority | [
"msg_long-running-agent_0"
] | [
{
"call_id": "msg_long-running-agent_10",
"result_id": "msg_long-running-agent_11"
},
{
"call_id": "msg_long-running-agent_14",
"result_id": "msg_long-running-agent_15"
},
{
"call_id": "msg_long-running-agent_16",
"result_id": "msg_long-running-agent_17"
},
{
"call_id": "msg_... | [
"msg_long-running-agent_1",
"msg_long-running-agent_2",
"msg_long-running-agent_3",
"msg_long-running-agent_6",
"msg_long-running-agent_7",
"msg_long-running-agent_8",
"msg_long-running-agent_9",
"msg_long-running-agent_12",
"msg_long-running-agent_13",
"msg_long-running-agent_14",
"msg_long-run... | [
"msg_long-running-agent_0",
"msg_long-running-agent_4",
"msg_long-running-agent_5",
"msg_long-running-agent_10",
"msg_long-running-agent_11",
"msg_long-running-agent_27",
"msg_long-running-agent_38",
"msg_long-running-agent_39",
"msg_long-running-agent_40",
"msg_long-running-agent_44",
"msg_long... | The current task-state messages survive across many turns; the original objective is never lost because it is high priority. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
pinned-instruction-001 | pinned-instruction | [
{
"id": "msg_pinned-instruction_0",
"role": "system",
"content": "You are a secure production coding assistant. Never expose credentials, API keys, or secrets in any response.",
"pinned": true
},
{
"id": "msg_pinned-instruction_1",
"role": "user",
"content": "I can't share credential... | 400 | 574 | true | dropOldest | [
"msg_pinned-instruction_0"
] | [
{
"call_id": "msg_pinned-instruction_10",
"result_id": "msg_pinned-instruction_11"
}
] | [
"msg_pinned-instruction_1",
"msg_pinned-instruction_2",
"msg_pinned-instruction_3",
"msg_pinned-instruction_4",
"msg_pinned-instruction_5",
"msg_pinned-instruction_6",
"msg_pinned-instruction_7",
"msg_pinned-instruction_8",
"msg_pinned-instruction_9"
] | [
"msg_pinned-instruction_0",
"msg_pinned-instruction_10",
"msg_pinned-instruction_11",
"msg_pinned-instruction_12",
"msg_pinned-instruction_13",
"msg_pinned-instruction_14",
"msg_pinned-instruction_15",
"msg_pinned-instruction_16",
"msg_pinned-instruction_17",
"msg_pinned-instruction_18",
"msg_pi... | The pinned system instruction survives eviction regardless of how small the budget is, even when hundreds of other messages do not. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
pinned-instruction-002 | pinned-instruction | [
{
"id": "msg_pinned-instruction_0",
"role": "system",
"content": "You are a secure production coding assistant. Never expose credentials, API keys, or secrets in any response.",
"pinned": true
},
{
"id": "msg_pinned-instruction_1",
"role": "user",
"content": "Understood β use the sec... | 400 | 1,314 | true | dropOldest | [
"msg_pinned-instruction_0"
] | [
{
"call_id": "msg_pinned-instruction_15",
"result_id": "msg_pinned-instruction_16"
},
{
"call_id": "msg_pinned-instruction_22",
"result_id": "msg_pinned-instruction_23"
},
{
"call_id": "msg_pinned-instruction_27",
"result_id": "msg_pinned-instruction_28"
},
{
"call_id": "msg_... | [
"msg_pinned-instruction_1",
"msg_pinned-instruction_2",
"msg_pinned-instruction_3",
"msg_pinned-instruction_4",
"msg_pinned-instruction_5",
"msg_pinned-instruction_6",
"msg_pinned-instruction_7",
"msg_pinned-instruction_8",
"msg_pinned-instruction_9",
"msg_pinned-instruction_10",
"msg_pinned-ins... | [
"msg_pinned-instruction_0",
"msg_pinned-instruction_60",
"msg_pinned-instruction_61",
"msg_pinned-instruction_62",
"msg_pinned-instruction_63",
"msg_pinned-instruction_64",
"msg_pinned-instruction_65",
"msg_pinned-instruction_66",
"msg_pinned-instruction_67",
"msg_pinned-instruction_68",
"msg_pi... | The pinned system instruction survives eviction regardless of how small the budget is, even when hundreds of other messages do not. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
pinned-instruction-003 | pinned-instruction | [
{
"id": "msg_pinned-instruction_0",
"role": "system",
"content": "You are a secure production coding assistant. Never expose credentials, API keys, or secrets in any response.",
"pinned": true
},
{
"id": "msg_pinned-instruction_1",
"role": "user",
"content": "Can you show me the curr... | 400 | 2,380 | true | dropOldest | [
"msg_pinned-instruction_0"
] | [
{
"call_id": "msg_pinned-instruction_11",
"result_id": "msg_pinned-instruction_12"
},
{
"call_id": "msg_pinned-instruction_19",
"result_id": "msg_pinned-instruction_20"
},
{
"call_id": "msg_pinned-instruction_22",
"result_id": "msg_pinned-instruction_23"
},
{
"call_id": "msg_... | [
"msg_pinned-instruction_1",
"msg_pinned-instruction_2",
"msg_pinned-instruction_3",
"msg_pinned-instruction_4",
"msg_pinned-instruction_5",
"msg_pinned-instruction_6",
"msg_pinned-instruction_7",
"msg_pinned-instruction_8",
"msg_pinned-instruction_9",
"msg_pinned-instruction_10",
"msg_pinned-ins... | [
"msg_pinned-instruction_0",
"msg_pinned-instruction_128",
"msg_pinned-instruction_129",
"msg_pinned-instruction_130",
"msg_pinned-instruction_131",
"msg_pinned-instruction_132",
"msg_pinned-instruction_133",
"msg_pinned-instruction_134",
"msg_pinned-instruction_135",
"msg_pinned-instruction_136",
... | The pinned system instruction survives eviction regardless of how small the budget is, even when hundreds of other messages do not. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
priority-based-context-001 | priority-based-context | [
{
"id": "msg_priority-based-context_0",
"role": "system",
"content": "You are an assistant prioritizing the current task above historical discussion.",
"pinned": true
},
{
"id": "msg_priority-based-context_1",
"role": "user",
"content": "Focus on the deploy issue, not the earlier for... | 600 | 440 | true | priority | [
"msg_priority-based-context_0"
] | [
{
"call_id": "msg_priority-based-context_4",
"result_id": "msg_priority-based-context_5"
},
{
"call_id": "msg_priority-based-context_7",
"result_id": "msg_priority-based-context_8"
},
{
"call_id": "msg_priority-based-context_11",
"result_id": "msg_priority-based-context_12"
},
{
... | [] | [
"msg_priority-based-context_0",
"msg_priority-based-context_1",
"msg_priority-based-context_2",
"msg_priority-based-context_3",
"msg_priority-based-context_4",
"msg_priority-based-context_5",
"msg_priority-based-context_6",
"msg_priority-based-context_7",
"msg_priority-based-context_8",
"msg_prior... | Messages tagged high priority (current task) survive over low-priority ones (earlier, unrelated discussion), regardless of age. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
priority-based-context-002 | priority-based-context | [
{
"id": "msg_priority-based-context_0",
"role": "system",
"content": "You are an assistant prioritizing the current task above historical discussion.",
"pinned": true
},
{
"id": "msg_priority-based-context_1",
"role": "assistant",
"content": "OK, let me check.",
"priority": 0
}... | 600 | 1,234 | true | priority | [
"msg_priority-based-context_0"
] | [
{
"call_id": "msg_priority-based-context_4",
"result_id": "msg_priority-based-context_5"
},
{
"call_id": "msg_priority-based-context_8",
"result_id": "msg_priority-based-context_9"
},
{
"call_id": "msg_priority-based-context_24",
"result_id": "msg_priority-based-context_25"
},
{
... | [
"msg_priority-based-context_1",
"msg_priority-based-context_2",
"msg_priority-based-context_3",
"msg_priority-based-context_6",
"msg_priority-based-context_7",
"msg_priority-based-context_11",
"msg_priority-based-context_12",
"msg_priority-based-context_13",
"msg_priority-based-context_14",
"msg_p... | [
"msg_priority-based-context_0",
"msg_priority-based-context_4",
"msg_priority-based-context_5",
"msg_priority-based-context_8",
"msg_priority-based-context_9",
"msg_priority-based-context_10",
"msg_priority-based-context_16",
"msg_priority-based-context_24",
"msg_priority-based-context_25",
"msg_p... | Messages tagged high priority (current task) survive over low-priority ones (earlier, unrelated discussion), regardless of age. | token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer. |
YAML Metadata Warning:The task_categories "conversational" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
context-management-bench
Live on the Hub: huggingface.co/datasets/shivam039-dev/context-management-bench
Realistic context-management scenarios for testing/benchmarking eviction strategies (drop-oldest, sliding-window, priority, summarization), pinned-message preservation, and tool-call/tool-result atomicity in multi-turn LLM conversations.
Dataset Summary
Every conversation in this dataset was generated deterministically and then run through the real @shivam.dixit/token-budget engine β the evicted_message_ids/retained_message_ids fields are not hand-authored or approximated, they're the actual output of the library's strategies applied to the generated conversation and budget. This means the dataset is reproducible end to end: the same generator, seed, and library version will always produce the same records.
Context management matters because every long-running LLM agent eventually accumulates more conversation history, tool calls, and tool results than its context window can hold, and naive trimming (.shift()/.slice(-N)) breaks in predictable ways β it can drop a pinned system instruction, split a tool-call from its result, or leave no record of what was removed and why. This dataset gives concrete before/after cases across eight realistic scenario categories, each demonstrating a specific thing an eviction strategy needs to get right.
Categories (3 conversations each, at 30/80/150 messages): coding-agent, research-agent, customer-support, tool-heavy-agent, long-running-agent, pinned-instruction, tool-call-atomicity, priority-based-context.
Intended Use
- Testing or benchmarking your own context-management/eviction algorithm against known-good expected behavior.
- Benchmarking LLM "memory" strategies (what should survive when a conversation exceeds budget).
- Evaluating whether a tool-call/tool-result preservation implementation actually keeps pairs atomic.
- Building or testing agent frameworks that need realistic multi-turn conversation shapes (mixed system/user/assistant/tool messages, interleaved tool-call pairs, pinned instructions).
- Testing context-window policies (e.g. "does my pinned system prompt survive at this budget").
Not intended for: training a model to generate conversations (the text is synthetic and templated, not naturalistic dialogue), or evaluating model output quality/intelligence β this dataset is about what stays in context, not what a model says.
Limitations
- This is not a benchmark of model intelligence. Nothing here evaluates response quality β only which messages an eviction strategy keeps or drops.
- Synthetic, not production traffic. Conversations are generated from a deterministic template-and-seed system (see
scripts/lib/generateConversation.tsin the source repository), not sampled from real usage. They're realistic in shape (system/user/assistant/tool interleaving, tool-call pairs, filler vs. substantive turns), not in exact wording. - Token counts are estimates, explicitly labeled as such.
token_count_estimateuses the library's built-in heuristic tokenizer (~4 characters/token) β the same defaultTokenBudgetuses when no real model tokenizer is configured. It is not an exact count from any specific model's tokenizer (OpenAI's, Anthropic's, or otherwise). Every record'snotesfield repeats this. expected_behaviordescribes what this specific strategy/budget combination does, not a universal rule. Different applications legitimately want different eviction policies for the same conversation shape β seedocs/strategy-guide.mdin the source repository for the general decision guidance this dataset's per-category choices are drawn from.- Small size. 24 records total (3 sizes Γ 8 categories) β enough to exercise every scenario shape at multiple conversation lengths, not a large-scale training corpus.
Schema
Each line of each data/<category>.jsonl file is one JSON record:
| Field | Type | Description |
|---|---|---|
id |
string | Unique record id, e.g. "coding-agent-002". |
scenario |
string | One of the eight category names. |
messages |
array of objects | The full conversation. Each message: { id, role, content, pinned?, priority?, toolCallId? } β the same shape @shivam.dixit/token-budget's addMessage() accepts directly. |
token_budget |
number | The maxTokens value the strategy was run against. |
token_count_estimate |
number | Total estimated tokens of the full conversation before eviction. An estimate β see Limitations. |
token_count_is_estimate |
boolean | Always true β present so a consumer can filter/flag on it programmatically without reading the docs. |
strategy |
string | Which built-in strategy was actually run: "dropOldest", "slidingWindow", or "priority". |
pinned_message_ids |
array of strings | Ids of messages marked pinned: true in the conversation. |
protected_tool_groups |
array of { call_id, result_id } |
Every tool-call/tool-result pair in the conversation, by id. |
evicted_message_ids |
array of strings | Message ids actually evicted by running the real library β not predicted or hand-written. |
retained_message_ids |
array of strings | Message ids that survived β the complement of evicted_message_ids. |
expected_behavior |
string | A human-readable description of what this scenario demonstrates. |
notes |
string | Caveats specific to this record (currently: the token-count-is-an-estimate note). |
Example
One trimmed record from data/pinned-instruction.jsonl (message list shortened for readability β see the actual file for the full conversation):
{
"id": "pinned-instruction-003",
"scenario": "pinned-instruction",
"messages": [
{ "id": "msg_pinned-instruction_0", "role": "system", "content": "You are a secure production coding assistant. Never expose credentials, API keys, or secrets in any response.", "pinned": true },
{ "id": "msg_pinned-instruction_1", "role": "user", "content": "Can you show me the current database connection string?" }
],
"token_budget": 400,
"token_count_estimate": 2380,
"token_count_is_estimate": true,
"strategy": "dropOldest",
"pinned_message_ids": ["msg_pinned-instruction_0"],
"protected_tool_groups": [{ "call_id": "msg_pinned-instruction_11", "result_id": "msg_pinned-instruction_12" }],
"evicted_message_ids": ["msg_pinned-instruction_1", "msg_pinned-instruction_2"],
"retained_message_ids": ["msg_pinned-instruction_0"],
"expected_behavior": "The pinned system instruction survives eviction regardless of how small the budget is, even when hundreds of other messages do not.",
"notes": "token_count_estimate uses the built-in heuristic estimator (~4 chars/token), the same default TokenBudget uses when no real tokenizer is configured β it is an estimate, not an exact count from any specific model's tokenizer."
}
Reproducing / regenerating this dataset
From the source repository:
git clone https://github.com/shivam039/token-budget.git
cd token-budget
npm install && npm run build
npm run generate:dataset
This runs scripts/generate-context-dataset.ts, which imports the same deterministic generator (scripts/lib/generateConversation.ts) used by the packages/token-budget-playground Hugging Face Space's own "Generate long conversation" feature β one implementation, not two.
Publishing updates to Hugging Face
.github/workflows/deploy-dataset.yml
pushes this directory to the Hugging Face dataset repo automatically on
every push to main that touches it (or on demand via the Actions tab).
It needs the dataset repo to already exist on Hugging Face β create it
once at huggingface.co/new-dataset
(name: context-management-bench, license: mit) β and the same
HF_TOKEN repository secret the playground's deploy workflow uses, with
write access to datasets. Missing either one doesn't fail the workflow;
it prints setup instructions and skips instead.
License
MIT β matching the source repository's LICENSE. All content is synthetically generated; no real user conversations, credentials, or personal data are included.
- Downloads last month
- 35