{
  "answers": {
    "c00": {
      "noul": 0.99,
      "type": "noul"
    },
    "c01": {
      "noul": 0.92,
      "type": "noul"
    },
    "c02": {
      "noul": 0.99,
      "type": "noul"
    },
    "c03": {
      "noul": 0.99,
      "type": "noul"
    },
    "c04": {
      "noul": 0.99,
      "type": "noul"
    },
    "c05": {
      "noul": 0.99,
      "type": "noul"
    },
    "c06": {
      "noul": 0.97,
      "type": "noul"
    },
    "c07": {
      "noul": 0.99,
      "type": "noul"
    },
    "c08": {
      "noul": 0.98,
      "type": "noul"
    },
    "c09": {
      "noul": 0.89,
      "type": "noul"
    },
    "w00": {
      "noul": 0.95,
      "type": "noul"
    },
    "w01": {
      "noul": 0.94,
      "type": "noul"
    },
    "w02": {
      "noul": 0.94,
      "type": "noul"
    },
    "w03": {
      "noul": 0.8,
      "type": "noul"
    },
    "w04": {
      "noul": 0.86,
      "type": "noul"
    },
    "w05": {
      "noul": 0.77,
      "type": "noul"
    },
    "w06": {
      "noul": 0.98,
      "type": "noul"
    },
    "w07": {
      "noul": 0.97,
      "type": "noul"
    },
    "w08": {
      "noul": 0.94,
      "type": "noul"
    }
  },
  "asked_at": "2026-11-23T03:05:36Z",
  "endpoint": "https://api.typesafe.ai/v1/systemone",
  "errors_helpful": [
    {
      "call": 0,
      "noul": 0.99,
      "question": "c00"
    },
    {
      "call": 1,
      "noul": 0.92,
      "question": "c01"
    },
    {
      "call": 2,
      "noul": 0.99,
      "question": "c02"
    },
    {
      "call": 3,
      "noul": 0.99,
      "question": "c03"
    },
    {
      "call": 4,
      "noul": 0.99,
      "question": "c04"
    },
    {
      "call": 5,
      "noul": 0.99,
      "question": "c05"
    },
    {
      "call": 6,
      "noul": 0.97,
      "question": "c06"
    },
    {
      "call": 7,
      "noul": 0.99,
      "question": "c07"
    },
    {
      "call": 8,
      "noul": 0.98,
      "question": "c08"
    },
    {
      "call": 9,
      "noul": 0.89,
      "question": "c09"
    }
  ],
  "format": "didrun.judgments.v1",
  "input_tokens": 11134,
  "method": "0.15.0",
  "model": "jev-1.14.0",
  "model_asked": "jev-1.14.0",
  "request": {
    "model": "jev-1.14.0",
    "questions": {
      "c00": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "conversation": {}
          },
          "parameter": "conversation",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool profile_context: Expected string, received object at conversation",
          "tool": "profile_context"
        },
        "type": "noul"
      },
      "c01": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool optimize_context: Required at conversation",
          "tool": "optimize_context"
        },
        "type": "noul"
      },
      "c02": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "conversation": {}
          },
          "parameter": "conversation",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool optimize_context: Expected string, received object at conversation",
          "tool": "optimize_context"
        },
        "type": "noul"
      },
      "c03": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "ids": "not an array"
          },
          "parameter": "ids",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool pack_context: Expected array, received string at ids",
          "tool": "pack_context"
        },
        "type": "noul"
      },
      "c04": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool save_handoff: Required at brief",
          "tool": "save_handoff"
        },
        "type": "noul"
      },
      "c05": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "brief": {}
          },
          "parameter": "brief",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool save_handoff: Expected string, received object at brief",
          "tool": "save_handoff"
        },
        "type": "noul"
      },
      "c06": {
        "criteria": {
          "false": "The reply names no argument of the tool: for example a generic failure, a stack trace with no argument named, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply names at least one argument of the tool that the call left out or got wrong, and so tells the caller what to change."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` name an argument that the call must add or fix?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool recall: Required at query",
          "tool": "recall"
        },
        "type": "noul"
      },
      "c07": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "query": {}
          },
          "parameter": "query",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool recall: Expected string, received object at query",
          "tool": "recall"
        },
        "type": "noul"
      },
      "c08": {
        "criteria": {
          "false": "The reply does not point to `parameter`: for example a generic failure, an error about another argument, an error from a service the tool tried to reach, or a normal answer.",
          "true": "The reply points to `parameter` or to its value and says the value has the wrong type or is not accepted."
        },
        "instructions": {
          "arguments_sent": {
            "provider": {}
          },
          "parameter": "provider",
          "question": "Does `reply` tell the caller that `parameter` has a value the tool does not accept?",
          "reply": "MCP error -32602: Input validation error: Invalid arguments for tool context_best_practices: Expected 'general' | 'anthropic' | 'openai', received object at provider",
          "tool": "context_best_practices"
        },
        "type": "noul"
      },
      "c09": {
        "criteria": {
          "false": "The reply does not say the tool is missing: for example a generic failure, a crash, or a normal answer.",
          "true": "The reply says the tool is unknown, not found, or does not exist."
        },
        "instructions": {
          "arguments_sent": {},
          "question": "Does `reply` tell the caller that there is no tool named `tool`?",
          "reply": "MCP error -32602: Tool didrun_unknown_tool not found",
          "tool": "didrun_unknown_tool"
        },
        "type": "noul"
      },
      "w00": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "The largest sources of waste are:\n\n1. **Stale build log:** approximately **12,000 tokens** that have already served their purpose.\n2. **Repeated parser paste:** three copies at approximately 2,000 tokens each; the two redundant copies account for approximately **4,000 tokens** of waste. The remaining copy could also be summarized if its full code is no longer needed.\n\nThe profiler estimates the full conversation at **~36,000 tokens**, with substantial uncertainty. I’ll refer to the build log as an already-acted-on result and to the parser by name rather than repeating either. Existing history remains in this chat; reducing what is reread would require starting a new one.",
          "done_when": "The transcript shows a profile of the supplied sketch identifying the stale build log and repeated parser paste as context issues.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "sketch": {
                  "blocks": [
                    {
                      "approx_tokens": 12000,
                      "kind": "tool_result",
                      "label": "build log",
                      "stale": true,
                      "turn": 4
                    },
                    {
                      "approx_tokens": 2000,
                      "kind": "code",
                      "label": "parser",
                      "repeated": 3,
                      "turn": 12
                    }
                  ],
                  "turns": 35
                }
              },
              "reply": "Context estimate from sketch: ~36k tokens, 35 turns.\n  18k plain conversation + 18k in pastes, tool output and images. Estimate, usually within ±20%.\n  Re-read on every turn. On a subscription this is what spends the usage limit.\n\nFindings (recoverable ~33k tokens, but only in a new chat: a chat app's history cannot be edited):\n1. HIGH [~12k] \"build log\" (turn 4, tool_result) is ~12k and already acted on.\n   → Replace \"build log\" with a one-line note of what it was and what came of it.\n2. WARN [~33k] 35 turns: every new message re-reads ~36k.\n   → Offer a handoff once: with the user's agreement, write a ≤400-token brief (goal, decisions, current state, open items, key identifiers) and call save_handoff, or the user picks the `handoff` prompt. A new chat re-reads ~3.5k of conversation instead, plus the app's own system prompt, which every chat carries.\n3. WARN [~4.0k] \"parser\" appears 3 times (~2.0k each).\n   → Refer to \"parser\" by name from now on; never re-quote it.\n4. WARN [~1.4k] \"parser\" (turn 12, code) is ~2.0k.\n   → Summarize \"parser\" into the points still needed (facts, identifiers, decisions) and work from the summary.\n\nAct on #1 in your reply (do it, do not just suggest it): work from your summary and refer to blocks by name from now on, which stops this chat growing; tell the user in one line what you summarized. What is already here stays until a new chat.",
              "tool": "profile_context"
            }
          ],
          "task": "Profile this conversation sketch for wasted context: 35 turns, with a stale tool result called build log at turn 4 of approximately 12,000 tokens, and a code paste called parser at turn 12 of approximately 2,000 tokens repeated three times. Identify the largest sources of waste."
        },
        "type": "noul"
      },
      "w01": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "The largest sources of waste are:\n\n1. **Stale build log:** approximately **12,000 tokens** that have already been acted on. I’ll treat it as a stale build log rather than repeat it; the sketch doesn’t include its outcome.\n2. **Repeated parser paste:** three copies at approximately **2,000 tokens each**. Keeping one copy would avoid roughly **4,000 tokens** of duplication; I’ll refer to it by name from now on.\n\nThe profiler estimates the conversation at **about 36,000 tokens** overall, with roughly 33,000 potentially recoverable by moving to a concise handoff in a new chat. The existing history cannot be shortened within this chat.",
          "done_when": "The transcript shows a profile of the supplied sketch identifying the stale build log and repeated parser paste as context issues.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "sketch": {
                  "blocks": [
                    {
                      "approx_tokens": 12000,
                      "kind": "tool_result",
                      "label": "build log",
                      "stale": true,
                      "turn": 4
                    },
                    {
                      "approx_tokens": 2000,
                      "kind": "code",
                      "label": "parser",
                      "repeated": 3,
                      "turn": 12
                    }
                  ],
                  "turns": 35
                }
              },
              "reply": "Context estimate from sketch: ~36k tokens, 35 turns.\n  18k plain conversation + 18k in pastes, tool output and images. Estimate, usually within ±20%.\n  Re-read on every turn. On a subscription this is what spends the usage limit.\n\nFindings (recoverable ~33k tokens, but only in a new chat: a chat app's history cannot be edited):\n1. HIGH [~12k] \"build log\" (turn 4, tool_result) is ~12k and already acted on.\n   → Replace \"build log\" with a one-line note of what it was and what came of it.\n2. WARN [~33k] 35 turns: every new message re-reads ~36k.\n   → Offer a handoff once: with the user's agreement, write a ≤400-token brief (goal, decisions, current state, open items, key identifiers) and call save_handoff, or the user picks the `handoff` prompt. A new chat re-reads ~3.5k of conversation instead, plus the app's own system prompt, which every chat carries.\n3. WARN [~4.0k] \"parser\" appears 3 times (~2.0k each).\n   → Refer to \"parser\" by name from now on; never re-quote it.\n4. WARN [~1.4k] \"parser\" (turn 12, code) is ~2.0k.\n   → Summarize \"parser\" into the points still needed (facts, identifiers, decisions) and work from the summary.\n\nAct on #1 in your reply (do it, do not just suggest it): work from your summary and refer to blocks by name from now on, which stops this chat growing; tell the user in one line what you summarized. What is already here stays until a new chat.",
              "tool": "profile_context"
            }
          ],
          "task": "Profile this conversation sketch for wasted context: 35 turns, with a stale tool result called build log at turn 4 of approximately 12,000 tokens, and a code paste called parser at turn 12 of approximately 2,000 tokens repeated three times. Identify the largest sources of waste."
        },
        "type": "noul"
      },
      "w02": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "The largest sources of wasted context are:\n\n1. **Stale build log:** approximately **12,000 tokens**. It has already been acted on, so it could be replaced in a handoff with a one-line note of its outcome.\n2. **Repeated parser paste:** approximately **4,000 redundant tokens**—two extra copies of a roughly 2,000-token paste. Refer to it by name rather than quoting it again.\n\nThe tool estimates the conversation at **~36,000 tokens total**, with estimates typically within ±20%. The existing history cannot be shortened within this chat; a new chat with a concise handoff would reduce what must be carried forward.\n\nFor this conversation, I’ll treat the build log as “a stale, already-acted-on build result” and refer to the parser by name. The sketch doesn’t include the log’s outcome or the parser’s contents.",
          "done_when": "The transcript shows a profile of the supplied sketch identifying the stale build log and repeated parser paste as context issues.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "sketch": {
                  "blocks": [
                    {
                      "approx_tokens": 12000,
                      "kind": "tool_result",
                      "label": "build log",
                      "stale": true,
                      "turn": 4
                    },
                    {
                      "approx_tokens": 2000,
                      "kind": "code",
                      "label": "parser",
                      "repeated": 3,
                      "turn": 12
                    }
                  ],
                  "turns": 35
                }
              },
              "reply": "Context estimate from sketch: ~36k tokens, 35 turns.\n  18k plain conversation + 18k in pastes, tool output and images. Estimate, usually within ±20%.\n  Re-read on every turn. On a subscription this is what spends the usage limit.\n\nFindings (recoverable ~33k tokens, but only in a new chat: a chat app's history cannot be edited):\n1. HIGH [~12k] \"build log\" (turn 4, tool_result) is ~12k and already acted on.\n   → Replace \"build log\" with a one-line note of what it was and what came of it.\n2. WARN [~33k] 35 turns: every new message re-reads ~36k.\n   → Offer a handoff once: with the user's agreement, write a ≤400-token brief (goal, decisions, current state, open items, key identifiers) and call save_handoff, or the user picks the `handoff` prompt. A new chat re-reads ~3.5k of conversation instead, plus the app's own system prompt, which every chat carries.\n3. WARN [~4.0k] \"parser\" appears 3 times (~2.0k each).\n   → Refer to \"parser\" by name from now on; never re-quote it.\n4. WARN [~1.4k] \"parser\" (turn 12, code) is ~2.0k.\n   → Summarize \"parser\" into the points still needed (facts, identifiers, decisions) and work from the summary.\n\nAct on #1 in your reply (do it, do not just suggest it): work from your summary and refer to blocks by name from now on, which stops this chat growing; tell the user in one line what you summarized. What is already here stays until a new chat.",
              "tool": "profile_context"
            }
          ],
          "task": "Profile this conversation sketch for wasted context: 35 turns, with a stale tool result called build log at turn 4 of approximately 12,000 tokens, and a code paste called parser at turn 12 of approximately 2,000 tokens repeated three times. Identify the largest sources of waste."
        },
        "type": "noul"
      },
      "w03": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "Redeploy the previous stable image, then verify that the health endpoint returns HTTP 200. If the health check fails, notify the on-call engineer.",
          "done_when": "The tool reply shows the relevant excerpt including redeploying the previous stable image and verifying the health endpoint.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "max_tokens": 300,
                "query": "What is the rollback procedure?",
                "text": "Deployment guide: Deploy version 2 using the release pipeline. Verify the health endpoint returns HTTP 200. Rollback procedure: redeploy the previous stable image and verify the health endpoint again. Escalation: notify the on-call engineer if health checks fail."
              },
              "reply": "PACKED ~96 of ~96 tokens (100%) from text: 1 of 1 chunks for \"What is the rollback procedure?\", budget 300.\n\n── text#1 · L1-1 · Deployment guide: Deploy version 2 using the release pipeline. Verify the health · ~96\nDeployment guide: Deploy version 2 using the release pipeline. Verify the health endpoint returns HTTP 200. Rollback procedure: redeploy the previous stable image and verify the health endpoint again. Escalation: notify the on-call engineer if health checks fail.",
              "tool": "pack_context"
            }
          ],
          "task": "Pack this text to answer “What is the rollback procedure?” within a 300-token budget: “Deployment guide: Deploy version 2 using the release pipeline. Verify the health endpoint returns HTTP 200. Rollback procedure: redeploy the previous stable image and verify the health endpoint again. Escalation: notify the on-call engineer if health checks fail.”"
        },
        "type": "noul"
      },
      "w04": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "**Rollback procedure:** Redeploy the previous stable image, then verify that the health endpoint returns HTTP 200. If health checks fail, notify the on-call engineer.",
          "done_when": "The tool reply shows the relevant excerpt including redeploying the previous stable image and verifying the health endpoint.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "max_tokens": 300,
                "query": "What is the rollback procedure?",
                "text": "Deployment guide: Deploy version 2 using the release pipeline. Verify the health endpoint returns HTTP 200. Rollback procedure: redeploy the previous stable image and verify the health endpoint again. Escalation: notify the on-call engineer if health checks fail."
              },
              "reply": "PACKED ~96 of ~96 tokens (100%) from text: 1 of 1 chunks for \"What is the rollback procedure?\", budget 300.\n\n── text#1 · L1-1 · Deployment guide: Deploy version 2 using the release pipeline. Verify the health · ~96\nDeployment guide: Deploy version 2 using the release pipeline. Verify the health endpoint returns HTTP 200. Rollback procedure: redeploy the previous stable image and verify the health endpoint again. Escalation: notify the on-call engineer if health checks fail.",
              "tool": "pack_context"
            }
          ],
          "task": "Pack this text to answer “What is the rollback procedure?” within a 300-token budget: “Deployment guide: Deploy version 2 using the release pipeline. Verify the health endpoint returns HTTP 200. Rollback procedure: redeploy the previous stable image and verify the health endpoint again. Escalation: notify the on-call engineer if health checks fail.”"
        },
        "type": "noul"
      },
      "w05": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "Redeploy the previous stable image, then verify that the health endpoint returns HTTP 200. If the health check fails, notify the on-call engineer.",
          "done_when": "The tool reply shows the relevant excerpt including redeploying the previous stable image and verifying the health endpoint.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "max_tokens": 300,
                "query": "What is the rollback procedure?",
                "text": "Deployment guide: Deploy version 2 using the release pipeline. Verify the health endpoint returns HTTP 200. Rollback procedure: redeploy the previous stable image and verify the health endpoint again. Escalation: notify the on-call engineer if health checks fail."
              },
              "reply": "PACKED ~96 of ~96 tokens (100%) from text: 1 of 1 chunks for \"What is the rollback procedure?\", budget 300.\n\n── text#1 · L1-1 · Deployment guide: Deploy version 2 using the release pipeline. Verify the health · ~96\nDeployment guide: Deploy version 2 using the release pipeline. Verify the health endpoint returns HTTP 200. Rollback procedure: redeploy the previous stable image and verify the health endpoint again. Escalation: notify the on-call engineer if health checks fail.",
              "tool": "pack_context"
            }
          ],
          "task": "Pack this text to answer “What is the rollback procedure?” within a 300-token budget: “Deployment guide: Deploy version 2 using the release pipeline. Verify the health endpoint returns HTTP 200. Rollback procedure: redeploy the previous stable image and verify the health endpoint again. Escalation: notify the on-call engineer if health checks fail.”"
        },
        "type": "noul"
      },
      "w06": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "The context-management tool returned these best practices for OpenAI models:\n\n1. **Keep stable content first.** Put system instructions, tool definitions, and stable reference material before changing content. Prompt caches depend on matching prefixes.\n2. **Trim tool results.** Truncate or summarize results before adding them to conversation history; retain what’s needed downstream.\n3. **Avoid inline binary data.** Use file or image APIs instead of putting base64 or binary data in text.\n4. **Summarize long histories.** Consider summarizing and dropping older turns after roughly 30–40 turns. Long contexts can become harder to use effectively before reaching the hard limit.\n5. **Deduplicate repeated content.** Replace later copies of a document or result with references where possible.\n6. **Measure before optimizing.** Profile the conversation to find the blocks contributing most to context usage.\n7. **Design for prefix caching.** The tool notes that caching is automatic for prompts over 1,024 tokens and relies on byte-identical prefixes.\n8. **Leave output headroom.** Budget for input and output together within the model’s context window, accounting for `max_completion_tokens`.",
          "done_when": "The transcript shows the OpenAI-specific context best-practices checklist returned by the tool.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "provider": "openai"
              },
              "reply": "1. Put stable content first (system prompt, tool definitions, reference docs) and volatile content last — prompt caches match byte-identical prefixes only.\n2. Truncate or summarize tool results before they enter history; keep only what the model actually needs downstream.\n3. Never inline base64/binary data in text content — use file/image APIs.\n4. Summarize and drop conversation history past ~30-40 turns; models lose the middle of long contexts well before the hard limit.\n5. Deduplicate: if the same document/result appears twice, replace later copies with a reference.\n6. Measure before optimizing — profile the conversation to find the actual heavy hitters.\n7. Prefix caching is automatic for prompts >1024 tokens — but only on byte-identical prefixes, so keep the front of your prompt stable.\n8. Use max_completion_tokens headroom math: input + output must fit the window together.",
              "tool": "context_best_practices"
            }
          ],
          "task": "Give me the context-management best practices for OpenAI models."
        },
        "type": "noul"
      },
      "w07": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "## Context-management best practices for OpenAI models\n\n- **Keep stable content first.** Put system instructions, tool definitions, and reference material before frequently changing content. Prompt caching depends on matching prefixes, so avoid unnecessary changes near the front of the prompt.\n- **Trim tool results before adding them to history.** Keep only the portions needed for subsequent steps, or summarize them.\n- **Avoid inlining binary data or base64 in text.** Use file or image APIs instead.\n- **Summarize long conversations.** Consider summarizing and dropping older history after roughly 30–40 turns; useful details can become harder to retrieve well before the context-window limit.\n- **Deduplicate repeated material.** Replace later copies of the same document or result with a reference when possible.\n- **Measure before optimizing.** Profile the conversation to identify which blocks actually consume the most tokens.\n- **Plan for both input and output.** Leave sufficient `max_completion_tokens` headroom: input and generated output must fit within the model’s context window.\n\nThe tool also reported that **prefix caching is automatic for prompts over 1,024 tokens** and requires byte-identical matching prefixes.",
          "done_when": "The transcript shows the OpenAI-specific context best-practices checklist returned by the tool.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "provider": "openai"
              },
              "reply": "1. Put stable content first (system prompt, tool definitions, reference docs) and volatile content last — prompt caches match byte-identical prefixes only.\n2. Truncate or summarize tool results before they enter history; keep only what the model actually needs downstream.\n3. Never inline base64/binary data in text content — use file/image APIs.\n4. Summarize and drop conversation history past ~30-40 turns; models lose the middle of long contexts well before the hard limit.\n5. Deduplicate: if the same document/result appears twice, replace later copies with a reference.\n6. Measure before optimizing — profile the conversation to find the actual heavy hitters.\n7. Prefix caching is automatic for prompts >1024 tokens — but only on byte-identical prefixes, so keep the front of your prompt stable.\n8. Use max_completion_tokens headroom math: input + output must fit the window together.",
              "tool": "context_best_practices"
            }
          ],
          "task": "Give me the context-management best practices for OpenAI models."
        },
        "type": "noul"
      },
      "w08": {
        "criteria": {
          "false": "The tool replies show an error, a missing or different result, or nothing about the task; or only the agent's final answer claims the task was done.",
          "true": "The tool replies in `steps` show the result that `done_when` describes. The result came from the server's tools, not only from the agent's own words."
        },
        "instructions": {
          "agent_final_answer": "### Context-management best practices for OpenAI models\n\n1. **Keep the prefix stable.** Put stable content—system instructions, tool definitions, and reference documents—first, and volatile content last. Prompt caching depends on matching prefixes.\n2. **Trim tool results.** Before adding results to conversation history, truncate or summarize them to retain only what’s needed downstream.\n3. **Avoid inline binary data.** Use file or image APIs rather than putting base64 or binary data into text content.\n4. **Manage long histories.** Summarize and drop older conversation history past roughly 30–40 turns; long contexts can be harder for models to use effectively even before reaching the hard limit.\n5. **Deduplicate content.** Replace repeated documents or results with references to the earlier copy.\n6. **Measure before optimizing.** Profile the conversation to identify the actual largest context blocks.\n7. **Leave output headroom.** Input and output must fit within the context window together; account for the output allowance, including `max_completion_tokens` where applicable.\n\nThe tool also reported that prefix caching is automatic for prompts over 1,024 tokens and relies on byte-identical prefixes.",
          "done_when": "The transcript shows the OpenAI-specific context best-practices checklist returned by the tool.",
          "how_it_ended": "answered",
          "question": "Did the agent finish `task`, as `done_when` describes, according to the tool replies in `steps`?",
          "steps": [
            {
              "arguments": {
                "provider": "openai"
              },
              "reply": "1. Put stable content first (system prompt, tool definitions, reference docs) and volatile content last — prompt caches match byte-identical prefixes only.\n2. Truncate or summarize tool results before they enter history; keep only what the model actually needs downstream.\n3. Never inline base64/binary data in text content — use file/image APIs.\n4. Summarize and drop conversation history past ~30-40 turns; models lose the middle of long contexts well before the hard limit.\n5. Deduplicate: if the same document/result appears twice, replace later copies with a reference.\n6. Measure before optimizing — profile the conversation to find the actual heavy hitters.\n7. Prefix caching is automatic for prompts >1024 tokens — but only on byte-identical prefixes, so keep the front of your prompt stable.\n8. Use max_completion_tokens headroom math: input + output must fit the window together.",
              "tool": "context_best_practices"
            }
          ],
          "task": "Give me the context-management best practices for OpenAI models."
        },
        "type": "noul"
      }
    },
    "state": {
      "about": "Replies of an MCP server to tool calls that were sent with bad input on purpose, to see whether its error messages help a caller fix the call."
    }
  },
  "run_id": "01M8334C9ZEQMQFS0K0BNXA1P0",
  "works_done": [
    {
      "attempt": 0,
      "noul": 0.95,
      "question": "w00"
    },
    {
      "attempt": 1,
      "noul": 0.94,
      "question": "w01"
    },
    {
      "attempt": 2,
      "noul": 0.94,
      "question": "w02"
    },
    {
      "attempt": 3,
      "noul": 0.8,
      "question": "w03"
    },
    {
      "attempt": 4,
      "noul": 0.86,
      "question": "w04"
    },
    {
      "attempt": 5,
      "noul": 0.77,
      "question": "w05"
    },
    {
      "attempt": 6,
      "noul": 0.98,
      "question": "w06"
    },
    {
      "attempt": 7,
      "noul": 0.97,
      "question": "w07"
    },
    {
      "attempt": 8,
      "noul": 0.94,
      "question": "w08"
    }
  ]
}
