[GH-ISSUE #6650] [Feature]: Show Decision model scores and outputs in debug mode #3720

Closed
opened 2026-10-21 06:06:31 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Sep 25, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6650

Originally assigned to: @kolacheee on GitHub.

What problem does this solve?

A user testing the Decision model with the latest Jev in GM mode reports that it is working for the most part and makes conditional behavior much more useful. However, testing decision trees is difficult when they have to infer the model's result from whichever output or branch is triggered.

They want to see the actual score/output so they can distinguish a low-scoring statement from a high-scoring one, understand borderline results, and refine their decision statements.

Proposed solution

Inspect recorded decision results

When debug mode is enabled, make the Decision model's actual result easy to inspect for each evaluated statement:

  • Show the statement alongside its returned score/probability, when available.
  • Show the threshold used and the resulting yes/no decision, or the selected output for a choice decision.
  • Include results for statements that evaluate to false, so authors can investigate branches that did not trigger.
  • Make it clear which turn/evaluation the result belongs to. Distinguish a missing or failed answer from an actual low score, and identify reused cached results where applicable.

Use the existing debug experience where practical. The core request is visibility into the values that drove the decision, without requiring authors to infer them from the generated response. Passive debug inspection should use the existing evaluation result and should not make an additional model call or change decision behavior. The explicit test action below is a separate, opt-in way to run fresh decision evaluations.

Test decisions in Peek Prompt

Add a Test decisions button inside Peek Prompt so authors can inspect the Decision model's actual input, run real decision questions, and see how the answers affect the assembled prompt. This is a dry run of prompt assembly with live Decision model calls; it does not generate a chat reply.

Suggested flow:

  1. Inspect the input. Show the selected Decision model, the chat context it will receive, the resolved statements, and any choice options. Use the same request construction as normal generation, including context trimming, macro resolution, and provider-specific formatting. An expandable request view should show the actual decision request content, without credentials.
  2. Run explicitly. Opening Peek Prompt remains passive. Only pressing Test decisions sends the decision requests. Explain beside the action: "Runs your Decision model without generating a chat reply. Hosted requests may incur charges."
  3. Read the results. Show each statement's returned score/probability where available, applicable threshold, yes/no result or selected choice, and any error or skip reason. Include negative results. An illustrative row could read: Score 0.42 · Threshold 0.50 · No.
  4. Inspect the effect. Apply those answers within the test preview and show which conditional text is included or excluded from the resulting prompt.

Behavior requirements:

  • Isolated test state: Do not write test answers into the live chat's decision cache, advance or persist sticky/cooldown timers, trigger agents, modify game state, or save a generated message. Live cached answers must not silently appear as freshly evaluated test results.
  • Match normal evaluation: Reuse production statement planning, model routing, thresholds, context selection, and request construction. Respect normal limits, timing rules, and held decisions. Show cached, held, deferred, over-limit, failed, and freshly evaluated results distinctly where applicable; a skipped or missing answer is not a low score.
  • Report only real values: Display probabilities only when the backend supplies them. If a choice response contains only the selected option, show that without inventing option probabilities. Values synthesized from a yes/no answer or a timer must not be presented as model confidence.
  • Distinguish historical evidence from a new test: Preserve the original recorded prompt when inspecting an old reply. Clearly label a new evaluation and the context/settings it uses. Do not present a reconstruction using current settings as the exact decision request or outcome from the original turn.
  • Keep the first version focused: Inspect inputs, run eligible decisions, and inspect the resulting prompt. In-panel statement editing, forced evaluation of normally skipped questions, and comparisons across repeated tests can be considered separately.

Implementation context: Peek Prompt's current preview path in packages/server/src/routes/generate/dry-run-route.ts reads cached answers without calling the Decision model. The live evaluator in packages/server/src/services/decision/prompt-decisions.ts writes shared turn-cache entries and can update timers, so a test path needs explicitly isolated state while sharing the actual decision logic.

Alternatives considered

  • Infer results from triggered branches: This is the user's current workaround, but it does not reveal how high or low a statement scored.
  • Inspect server debug logs: The current code already logs prompt-decision probabilities and yes/no results at debug level, and the conditional-prompts guide documents this. Check whether these diagnostics are exposed consistently through the user's debug-mode setting and extend or surface them as needed.
  • Use the connection's Test action: This checks a fixed sample rather than the user's decision statements in the current chat.

Additional context

Original user feedback:

Testing out the new decision making model with latest jev in GM mode. Really happy with this tool. I feel like a lot of options have opened up with basically an overpowered if/else. Thanks for implementing this! It's working for the most part, though I think it'd be nice to have it return the actual jev score/output in debug mode, this will make it a lot easier to test decision making trees since we'll know whether something is scoring low or high rather than just rely on the outputs being triggered.

The exact Engine version, Jev version/provider, and debug settings were not supplied. This is a request for improved diagnostic visibility; the reported experience has not been independently reproduced.

Related: #6569 (Decision model prompt conditionals).

Relevant existing code: packages/server/src/services/decision/prompt-decisions.ts. This belongs to Engine's shared Decision model/debug integration.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @kolacheee on GitHub (Sep 25, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6650 Originally assigned to: @kolacheee on GitHub. ## What problem does this solve? A user testing the Decision model with the latest Jev in GM mode reports that it is working for the most part and makes conditional behavior much more useful. However, testing decision trees is difficult when they have to infer the model's result from whichever output or branch is triggered. They want to see the actual score/output so they can distinguish a low-scoring statement from a high-scoring one, understand borderline results, and refine their decision statements. ## Proposed solution ### Inspect recorded decision results When debug mode is enabled, make the Decision model's actual result easy to inspect for each evaluated statement: - Show the statement alongside its returned score/probability, when available. - Show the threshold used and the resulting yes/no decision, or the selected output for a choice decision. - Include results for statements that evaluate to false, so authors can investigate branches that did not trigger. - Make it clear which turn/evaluation the result belongs to. Distinguish a missing or failed answer from an actual low score, and identify reused cached results where applicable. Use the existing debug experience where practical. The core request is visibility into the values that drove the decision, without requiring authors to infer them from the generated response. Passive debug inspection should use the existing evaluation result and should not make an additional model call or change decision behavior. The explicit test action below is a separate, opt-in way to run fresh decision evaluations. ### Test decisions in Peek Prompt Add a **Test decisions** button inside Peek Prompt so authors can inspect the Decision model's actual input, run real decision questions, and see how the answers affect the assembled prompt. This is a dry run of prompt assembly with live Decision model calls; it does not generate a chat reply. Suggested flow: 1. **Inspect the input.** Show the selected Decision model, the chat context it will receive, the resolved statements, and any choice options. Use the same request construction as normal generation, including context trimming, macro resolution, and provider-specific formatting. An expandable request view should show the actual decision request content, without credentials. 2. **Run explicitly.** Opening Peek Prompt remains passive. Only pressing **Test decisions** sends the decision requests. Explain beside the action: "Runs your Decision model without generating a chat reply. Hosted requests may incur charges." 3. **Read the results.** Show each statement's returned score/probability where available, applicable threshold, yes/no result or selected choice, and any error or skip reason. Include negative results. An illustrative row could read: `Score 0.42 · Threshold 0.50 · No`. 4. **Inspect the effect.** Apply those answers within the test preview and show which conditional text is included or excluded from the resulting prompt. Behavior requirements: - **Isolated test state:** Do not write test answers into the live chat's decision cache, advance or persist sticky/cooldown timers, trigger agents, modify game state, or save a generated message. Live cached answers must not silently appear as freshly evaluated test results. - **Match normal evaluation:** Reuse production statement planning, model routing, thresholds, context selection, and request construction. Respect normal limits, timing rules, and held decisions. Show cached, held, deferred, over-limit, failed, and freshly evaluated results distinctly where applicable; a skipped or missing answer is not a low score. - **Report only real values:** Display probabilities only when the backend supplies them. If a choice response contains only the selected option, show that without inventing option probabilities. Values synthesized from a yes/no answer or a timer must not be presented as model confidence. - **Distinguish historical evidence from a new test:** Preserve the original recorded prompt when inspecting an old reply. Clearly label a new evaluation and the context/settings it uses. Do not present a reconstruction using current settings as the exact decision request or outcome from the original turn. - **Keep the first version focused:** Inspect inputs, run eligible decisions, and inspect the resulting prompt. In-panel statement editing, forced evaluation of normally skipped questions, and comparisons across repeated tests can be considered separately. Implementation context: Peek Prompt's current preview path in `packages/server/src/routes/generate/dry-run-route.ts` reads cached answers without calling the Decision model. The live evaluator in `packages/server/src/services/decision/prompt-decisions.ts` writes shared turn-cache entries and can update timers, so a test path needs explicitly isolated state while sharing the actual decision logic. ## Alternatives considered - **Infer results from triggered branches:** This is the user's current workaround, but it does not reveal how high or low a statement scored. - **Inspect server debug logs:** The current code already logs prompt-decision probabilities and yes/no results at debug level, and the conditional-prompts guide documents this. Check whether these diagnostics are exposed consistently through the user's debug-mode setting and extend or surface them as needed. - **Use the connection's Test action:** This checks a fixed sample rather than the user's decision statements in the current chat. ## Additional context Original user feedback: > Testing out the new decision making model with latest jev in GM mode. Really happy with this tool. I feel like a lot of options have opened up with basically an overpowered if/else. Thanks for implementing this! It's working for the most part, though I think it'd be nice to have it return the actual jev score/output in debug mode, this will make it a lot easier to test decision making trees since we'll know whether something is scoring low or high rather than just rely on the outputs being triggered. The exact Engine version, Jev version/provider, and debug settings were not supplied. This is a request for improved diagnostic visibility; the reported experience has not been independently reproduced. Related: #6569 (Decision model prompt conditionals). Relevant existing code: `packages/server/src/services/decision/prompt-decisions.ts`. This belongs to Engine's shared Decision model/debug integration. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@kolacheee commented on GitHub (Sep 25, 2026):

Implementation is underway in #6666, owned by @kolacheee with Codex. The PR targets staging and covers recorded decision diagnostics plus isolated decision testing in Peek Prompt.

<!-- gh-comment-id:5835407205 --> @kolacheee commented on GitHub (Sep 25, 2026): Implementation is underway in #6666, owned by @kolacheee with Codex. The PR targets staging and covers recorded decision diagnostics plus isolated decision testing in Peek Prompt.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3720
No description provided.