Spaces:
Running
Running
File size: 25,266 Bytes
bb7a6d6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 | {
"test_suite": "las_react_file_categorization_v1",
"version": "1.0",
"description": "ReAct loop evaluation for file categorization. Sourced from LAS production archives (logs/archive/*.zip). Tests model ability to maintain tool-call coherence over iterative execution — the primary failure mode observed in production (ADR-CORE-064).",
"prompts": [
{
"id": "categorize_6_files_with_dirs",
"name": "Categorize 6 files into existing category directories",
"category": "react_core",
"severity": "critical",
"mode": "react",
"system": "You are a file organization specialist. You have tools to interact with the filesystem: list directories, read files, create directories, and move files.\n\nYour task is to organize files by reading their contents and moving them to the appropriate category folder.\n\nRules:\n1. Read each file to understand its content before moving\n2. Move files to the most appropriate category directory\n3. Destination paths MUST include the filename (e.g., animals/1.txt, NOT just animals/)\n4. Do NOT create directories that already exist\n5. When finished, stop calling tools",
"user": "Organize the files in ./categories_test/ into the category folders based on their content.",
"max_iterations": 20,
"tools": [
{
"type": "function",
"function": {
"name": "list_directory",
"description": "List files and subdirectories in a directory. Returns entries prefixed with [FILE] or [DIR].",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Directory path to list"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "read_file",
"description": "Read the contents of a text file.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path to read"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "create_directory",
"description": "Create a new directory. Parent directories are created automatically.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Directory path to create"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "move_file",
"description": "Move a file from source to destination path.",
"parameters": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Current file path"
},
"destination": {
"type": "string",
"description": "Target file path (must include filename)"
}
},
"required": ["source", "destination"]
}
}
}
],
"mock_tools": {
"list_directory": {
"./categories_test": "[FILE] ./categories_test/1.txt\n[FILE] ./categories_test/2.txt\n[FILE] ./categories_test/3.txt\n[FILE] ./categories_test/4.txt\n[FILE] ./categories_test/5.txt\n[FILE] ./categories_test/6.txt\n[DIR] ./categories_test/animals\n[DIR] ./categories_test/fruits\n[DIR] ./categories_test/colors",
"./categories_test/": "[FILE] ./categories_test//1.txt\n[FILE] ./categories_test//2.txt\n[FILE] ./categories_test//3.txt\n[FILE] ./categories_test//4.txt\n[FILE] ./categories_test//5.txt\n[FILE] ./categories_test//6.txt\n[DIR] ./categories_test//animals\n[DIR] ./categories_test//fruits\n[DIR] ./categories_test//colors"
},
"read_file": {
"./categories_test/1.txt": "The zebra is a striped animal native to Africa. It belongs to the horse family.\n",
"./categories_test/2.txt": "An apple is a delicious fruit that grows on trees. Popular varieties include Fuji and Braeburn.\n",
"./categories_test/3.txt": "The sky appears blue due to Rayleigh scattering of sunlight in the atmosphere.\n",
"./categories_test/4.txt": "Elephants are the largest land mammals. They have excellent memory and complex social structures.\n",
"./categories_test/5.txt": "Bananas are tropical fruits rich in potassium. They grow in clusters called hands.\n",
"./categories_test/6.txt": "Red is a primary color associated with passion, energy, and warmth.\n"
},
"create_directory": {
"_default": "Directory created"
},
"move_file": {
"_default": "File moved successfully"
}
},
"pass_criteria": "Model reads all 6 files and moves each to the correct category (animals: 1,4; fruits: 2,5; colors: 3,6). All move_file calls have valid source and destination with filename included. No garbled paths or empty arguments.",
"expected_response": "All 6 files categorized: 1.txt and 4.txt moved to animals/, 2.txt and 5.txt moved to fruits/, 3.txt and 6.txt moved to colors/."
},
{
"id": "categorize_6_files_create_dirs",
"name": "Categorize 6 files — must create category directories first",
"category": "react_core",
"severity": "critical",
"mode": "react",
"system": "You are a file organization specialist. You have tools to interact with the filesystem: list directories, read files, create directories, and move files.\n\nYour task is to organize files by reading their contents and moving them to the appropriate category folder.\n\nRules:\n1. List the directory to see what files exist\n2. Read each file to understand its content\n3. Create category directories as needed\n4. Move files to the correct category\n5. Destination paths MUST include the filename (e.g., animals/1.txt)\n6. When finished, stop calling tools",
"user": "Organize the files in ./sort_test/ into logical categories based on their content. Create appropriate category directories and move each file to its category.",
"max_iterations": 25,
"tools": [
{
"type": "function",
"function": {
"name": "list_directory",
"description": "List files and subdirectories in a directory. Returns entries prefixed with [FILE] or [DIR].",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Directory path to list"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "read_file",
"description": "Read the contents of a text file.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path to read"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "create_directory",
"description": "Create a new directory. Parent directories are created automatically.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Directory path to create"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "move_file",
"description": "Move a file from source to destination path.",
"parameters": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Current file path"
},
"destination": {
"type": "string",
"description": "Target file path (must include filename)"
}
},
"required": ["source", "destination"]
}
}
}
],
"mock_tools": {
"list_directory": {
"./sort_test": "[FILE] ./sort_test/1.txt\n[FILE] ./sort_test/2.txt\n[FILE] ./sort_test/3.txt\n[FILE] ./sort_test/4.txt\n[FILE] ./sort_test/5.txt\n[FILE] ./sort_test/6.txt",
"./sort_test/": "[FILE] ./sort_test//1.txt\n[FILE] ./sort_test//2.txt\n[FILE] ./sort_test//3.txt\n[FILE] ./sort_test//4.txt\n[FILE] ./sort_test//5.txt\n[FILE] ./sort_test//6.txt"
},
"read_file": {
"./sort_test/1.txt": "The zebra is a striped animal native to Africa. It belongs to the horse family.\n",
"./sort_test/2.txt": "An apple is a delicious fruit that grows on trees. Popular varieties include Fuji and Braeburn.\n",
"./sort_test/3.txt": "The sky appears blue due to Rayleigh scattering of sunlight in the atmosphere.\n",
"./sort_test/4.txt": "Elephants are the largest land mammals. They have excellent memory and complex social structures.\n",
"./sort_test/5.txt": "Bananas are tropical fruits rich in potassium. They grow in clusters called hands.\n",
"./sort_test/6.txt": "Red is a primary color associated with passion, energy, and warmth.\n"
},
"create_directory": {
"_default": "Directory created"
},
"move_file": {
"_default": "File moved successfully"
}
},
"pass_criteria": "Model discovers files via list_directory, reads contents, creates appropriate category directories, then moves all 6 files correctly. Categories should be semantically correct (animals for zebra/elephants, fruits for apple/bananas, colors for blue sky/red). No directories exist initially — model must create them.",
"expected_response": "Created 3 category directories and moved all 6 files: animals (1.txt zebra, 4.txt elephants), fruits (2.txt apple, 5.txt bananas), colors (3.txt blue sky, 6.txt red)."
},
{
"id": "categorize_with_eisdir_recovery",
"name": "Recover from EISDIR error on move (production failure pattern)",
"category": "error_recovery",
"severity": "critical",
"mode": "react",
"system": "You are a file organization specialist. You have tools to interact with the filesystem: list directories, read files, create directories, and move files.\n\nYour task is to organize files by reading their contents and moving them to the appropriate category folder.\n\nRules:\n1. Read files to understand content before moving\n2. Destination paths MUST include the filename (e.g., animals/1.txt, NOT just animals/)\n3. If a move fails, read the error message carefully and fix your approach\n4. When finished, stop calling tools",
"user": "Move the remaining files in ./categories_test/ into the existing category folders based on their content.",
"max_iterations": 15,
"tools": [
{
"type": "function",
"function": {
"name": "list_directory",
"description": "List files and subdirectories in a directory. Returns entries prefixed with [FILE] or [DIR].",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Directory path to list"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "read_file",
"description": "Read the contents of a text file.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path to read"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "move_file",
"description": "Move a file from source to destination path.",
"parameters": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Current file path"
},
"destination": {
"type": "string",
"description": "Target file path (must include filename)"
}
},
"required": ["source", "destination"]
}
}
}
],
"mock_tools": {
"list_directory": {
"./categories_test": "[FILE] ./categories_test/4.txt\n[FILE] ./categories_test/5.txt\n[FILE] ./categories_test/6.txt\n[DIR] ./categories_test/animals\n[DIR] ./categories_test/fruits\n[DIR] ./categories_test/colors",
"./categories_test/": "[FILE] ./categories_test//4.txt\n[FILE] ./categories_test//5.txt\n[FILE] ./categories_test//6.txt\n[DIR] ./categories_test//animals\n[DIR] ./categories_test//fruits\n[DIR] ./categories_test//colors"
},
"read_file": {
"./categories_test/4.txt": "Elephants are the largest land mammals. They have excellent memory and complex social structures.\n",
"./categories_test/5.txt": "Bananas are tropical fruits rich in potassium. They grow in clusters called hands.\n",
"./categories_test/6.txt": "Red is a primary color associated with passion, energy, and warmth.\n"
},
"move_file": {
"{\"destination\": \"./categories_test/animals/\", \"source\": \"./categories_test/4.txt\"}": "Error: External MCP tool call failed: filesystem.move_file()\nError: EISDIR: illegal operation on a directory, rename '/workspace/categories_test/4.txt' -> '/workspace/categories_test/animals'\nThis is a fail-fast error (no fallback in Stage 1).\n\nHint: You previously succeeded with: ./categories_test/4.txt\nDid you forget the directory prefix?",
"{\"destination\": \"./categories_test/fruits/\", \"source\": \"./categories_test/5.txt\"}": "Error: External MCP tool call failed: filesystem.move_file()\nError: EISDIR: illegal operation on a directory, rename '/workspace/categories_test/5.txt' -> '/workspace/categories_test/fruits'\nThis is a fail-fast error (no fallback in Stage 1).\n\nHint: You previously succeeded with: ./categories_test/5.txt\nDid you forget the directory prefix?",
"{\"destination\": \"./categories_test/colors/\", \"source\": \"./categories_test/6.txt\"}": "Error: External MCP tool call failed: filesystem.move_file()\nError: EISDIR: illegal operation on a directory, rename '/workspace/categories_test/6.txt' -> '/workspace/categories_test/colors'\nThis is a fail-fast error (no fallback in Stage 1).\n\nHint: You previously succeeded with: ./categories_test/6.txt\nDid you forget the directory prefix?",
"_default": "File moved successfully"
}
},
"pass_criteria": "Model recovers from EISDIR errors by including the filename in the destination path. If it first tries animals/ (directory-only), it should learn from the error and retry with animals/4.txt. All 3 files must be moved successfully. Tests error recovery under accumulated context.",
"expected_response": "Moved 3 files with error recovery: 4.txt to animals/4.txt, 5.txt to fruits/5.txt, 6.txt to colors/6.txt. Recovered from EISDIR errors by including filename in destination."
},
{
"id": "categorize_ambiguous_content",
"name": "Categorize files with ambiguous cross-category content",
"category": "semantic_reasoning",
"severity": "warning",
"mode": "react",
"system": "You are a file organization specialist. You have tools to interact with the filesystem: list directories, read files, create directories, and move files.\n\nYour task is to organize files by reading their contents and moving them to the appropriate category folder.\n\nRules:\n1. Read each file to understand its content\n2. Categorize by the PRIMARY subject, not secondary references\n3. A flamingo is primarily an animal (not a color, despite being pink)\n4. Orange juice is primarily a fruit product (not a color, despite the word 'orange')\n5. A golden retriever is primarily an animal (not a color, despite 'golden')\n6. Destination paths MUST include the filename\n7. When finished, stop calling tools",
"user": "Organize the files in ./ambiguous_test/ into the category folders. Some files reference multiple categories — use your best judgment to categorize by primary subject.",
"max_iterations": 15,
"tools": [
{
"type": "function",
"function": {
"name": "list_directory",
"description": "List files and subdirectories in a directory. Returns entries prefixed with [FILE] or [DIR].",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Directory path to list"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "read_file",
"description": "Read the contents of a text file.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path to read"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "move_file",
"description": "Move a file from source to destination path.",
"parameters": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Current file path"
},
"destination": {
"type": "string",
"description": "Target file path (must include filename)"
}
},
"required": ["source", "destination"]
}
}
}
],
"mock_tools": {
"list_directory": {
"./ambiguous_test": "[FILE] ./ambiguous_test/a.txt\n[FILE] ./ambiguous_test/b.txt\n[FILE] ./ambiguous_test/c.txt\n[DIR] ./ambiguous_test/animals\n[DIR] ./ambiguous_test/fruits\n[DIR] ./ambiguous_test/colors",
"./ambiguous_test/": "[FILE] ./ambiguous_test//a.txt\n[FILE] ./ambiguous_test//b.txt\n[FILE] ./ambiguous_test//c.txt\n[DIR] ./ambiguous_test//animals\n[DIR] ./ambiguous_test//fruits\n[DIR] ./ambiguous_test//colors"
},
"read_file": {
"./ambiguous_test/a.txt": "The flamingo is a pink bird found in tropical regions. Its distinctive color comes from its diet.\n",
"./ambiguous_test/b.txt": "Orange juice is made from oranges and is rich in vitamin C. It is one of the most popular beverages.\n",
"./ambiguous_test/c.txt": "The golden retriever has a beautiful golden coat. They are one of the most popular dog breeds.\n"
},
"move_file": {
"_default": "File moved successfully"
}
},
"pass_criteria": "Model categorizes by primary subject: a.txt (flamingo) to animals/ (not colors despite 'pink'), b.txt (orange juice) to fruits/ (not colors despite 'orange'), c.txt (golden retriever) to animals/ (not colors despite 'golden'). All move_file destinations include the filename.",
"expected_response": "Categorized 3 ambiguous files by primary subject: a.txt (flamingo) to animals, b.txt (orange juice) to fruits, c.txt (golden retriever) to animals."
},
{
"id": "categorize_documents_by_type",
"name": "Categorize technical documents (ADRs, specs, notes)",
"category": "domain_transfer",
"severity": "warning",
"mode": "react",
"system": "You are a file organization specialist. You have tools to interact with the filesystem: list directories, read files, create directories, and move files.\n\nYour task is to organize documents by reading their contents and moving them to the appropriate type folder.\n\nRules:\n1. Read each document to understand its type\n2. Architecture Decision Records (ADRs) have titles like 'ADR-NNN' and Status/Context/Decision sections\n3. API specifications describe endpoints and data formats\n4. Meeting notes list attendees and discussion topics\n5. Destination paths MUST include the filename\n6. When finished, stop calling tools",
"user": "Organize the documents in ./docs_test/ into the type folders based on their content.",
"max_iterations": 15,
"tools": [
{
"type": "function",
"function": {
"name": "list_directory",
"description": "List files and subdirectories in a directory. Returns entries prefixed with [FILE] or [DIR].",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Directory path to list"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "read_file",
"description": "Read the contents of a text file.",
"parameters": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "File path to read"
}
},
"required": ["path"]
}
}
},
{
"type": "function",
"function": {
"name": "move_file",
"description": "Move a file from source to destination path.",
"parameters": {
"type": "object",
"properties": {
"source": {
"type": "string",
"description": "Current file path"
},
"destination": {
"type": "string",
"description": "Target file path (must include filename)"
}
},
"required": ["source", "destination"]
}
}
}
],
"mock_tools": {
"list_directory": {
"./docs_test": "[FILE] ./docs_test/doc1.md\n[FILE] ./docs_test/doc2.md\n[FILE] ./docs_test/doc3.md\n[FILE] ./docs_test/doc4.md\n[DIR] ./docs_test/adrs\n[DIR] ./docs_test/specs\n[DIR] ./docs_test/notes"
},
"read_file": {
"./docs_test/doc1.md": "# ADR-001: Use PostgreSQL for persistence\n\n## Status\nAccepted\n\n## Context\nWe need a relational database that supports JSONB columns for semi-structured data.\n\n## Decision\nUse PostgreSQL 15+ with JSONB columns for flexible schema evolution.\n",
"./docs_test/doc2.md": "# API Specification v2.0\n\n## Endpoints\n\nGET /users - Returns list of users\nPOST /users - Create a new user\nGET /users/{id} - Returns a specific user\nDELETE /users/{id} - Delete a user\n\n## Authentication\nAll endpoints require Bearer token.\n",
"./docs_test/doc3.md": "Meeting notes 2024-01-15\n\nAttendees: Alice, Bob, Charlie\n\nDiscussed timeline for Q1 deliverables. Alice will lead the API redesign. Bob raised concerns about database migration timeline. Next meeting: Jan 22.\n",
"./docs_test/doc4.md": "# ADR-002: Adopt TypeScript for Frontend\n\n## Status\nProposed\n\n## Context\nOur JavaScript codebase has grown to 50k+ lines with increasing type-related bugs.\n\n## Decision\nMigrate frontend to TypeScript with strict mode enabled.\n"
},
"move_file": {
"_default": "File moved successfully"
}
},
"pass_criteria": "Model correctly identifies document types: doc1.md and doc4.md are ADRs (move to adrs/), doc2.md is an API spec (move to specs/), doc3.md is meeting notes (move to notes/). All 4 files moved with filename in destination path.",
"expected_response": "Organized 4 documents: doc1.md (ADR-001) and doc4.md (ADR-002) to adrs/, doc2.md (API spec) to specs/, doc3.md (meeting notes) to notes/."
}
]
}
|