Optimizing Decision Models by Asking Side Questions

Introducing SideQuestions, an optimizer for decision models that works by identifying additional helpful questions.

Decision models, also called system one models, are different from LLMs. They’re fast, cheap, and they return typed answers as probabilities. They cache differently, storing a state that is shared by many questions. They don’t reason. Unlike large LLMs, they don’t explore a search space from multiple angles before answering.

These unique qualities deserve new optimizers. When we shipped support for decision models in DSPy, we included ReAnchor, an optimizer for models like Jev that adjusts the thresholds, weights, and cuts of a DSPy program. For many programs, this is sufficient. ReAnchor is cheap, quick, and effective.

But if we want to push our programs further (and can’t or don’t want to adjust the models’ weights) we can do better. Today we’re introducing SideQuestions, an optimizer for decision models that works by identifying additional helpful questions.


Suppose we want to identify fraudulent hotel reviews for a travel platform. We might have a program that asks

  • Was this hotel review written by someone who did not actually stay at the hotel?

If we ask a reasoning model we can see how the model reasons towards an answer. We posed the above, with an example review, to deepseek-4.1-flash. During its reasoning it noted:

  • The hotel name is garbled, a common sign the review is fabricated.
  • The reviewer gives no specifics about the actual location or features of the hotel. All complaints are general and could apply to any hotel.
  • The review contains internal contradictions.
  • The review is written to argue a point, rather than report an experience.

These stops along the way fill the context window and influence the model’s final response.

Decision models can’t do this. But we can do it for them, by evaluating their performance and suggesting additional questions that could inform the final response. Running SideQuestions on the program above, GPT-6.1-Sol identified ten questions that could inform the response. Here’s a sample:

  • Does the review identify a booking intermediary or a rewards program used to arrange the stay?
  • Does the review state a specific monetary amount for a room, upgrade, parking, food, or another hotel-related expense?
  • Does the review rely mainly on broad evaluations such as comfortable, dirty, friendly, luxurious, or disappointing?
  • Does the review compare this hotel with the reviewer’s previous experience of other hotels?

On held-out hotel reviews, ten side questions raised Jev’s accuracy from 57% to 80%. And thanks to the caching behavior of decision models, asking ten additional questions only doubled our cost per call, and latency rose by just 7%.

SideQuestions on Jev
Deceptive hotel reviewsaccuracygainlatencycost

“Was this hotel review written by someone who did not actually stay at the hotel?”

Jev57.3%0.06 s$0.026
GPT-6-Luna72.0%+14.71.74 s$0.136
Jev + SideQuestions79.5%+22.20.07 s$0.059
Beemo, raw model outputaccuracygainlatencycost

“Was this response written by an AI language model rather than a person?”

Jev50.2%0.06 s$0.032
GPT-6-Luna53.7%+3.51.53 s$0.169
Jev + SideQuestions78.2%+28.00.07 s$0.064
Ghostbuster essaysaccuracygainlatencycost

“Was this essay written by an AI language model rather than a student?”

Jev51.2%0.06 s$0.041
GPT-6-Luna79.8%+28.62.07 s$0.221
Jev + SideQuestions100.0%+48.80.07 s$0.053
0%20%40%60%80%100%

Accuracy on held-out test sets. Median latency of 40 sequential calls, cost per 1,000 calls.

How SideQuestions Works

The optimizer works like this:

  1. SideQuestions runs the program on training examples and scores each output with your metric.
  2. A reflection LLM reviews the results and suggests yes/no side questions that could help the program answer correctly.
  3. The decision model answers the suggested questions on the training examples. A small regression model combines those answers with the original answer, weighting each question and dropping those that add nothing.

GEPA runs this loop several times, evolving new lists of side questions from the best lists so far. At the end, a held-out check set decides for each output whether to use the side questions, a reanchored answer or the student’s original answer.

Getting Started with SideQuestions

To use SideQuestions, install it with pip or uv:

pip install dspy-side-questions

If you have an existing DSPy program that uses a decision model like Jev, swapping ReAnchor out for SideQuestions is simple:

import dspy
from dspy.experimental import Noul
from dspy_side_questions import SideQuestions

Verdict = Noul[(True, "A phishing attempt"), (False, "Legitimate")]

class Phish(dspy.Signature):
    """Classify an email."""

    email: str = dspy.InputField()
    is_phishing: Verdict = dspy.OutputField(
        desc="Is this email phishing?"
    )

def accuracy(example, pred, trace=None):
    return float(pred.is_phishing.value == example.is_phishing)

student = dspy.Predict(Phish)
student.set_lm(dspy.LM("typesafe:jev-latest"))

optimizer = SideQuestions(
    accuracy, reflection_lm=dspy.LM("openai/gpt-6-luna")
)
program = optimizer.compile(student, trainset=train, valset=val)

SideQuestions Results Across Decision Models

SideQuestions works well with all decision models, not just Jev (heck, with DSPy you can run it on an LLM program, too). Take a look:

Deceptive hotel reviews, by decision model
Jevaccuracygain
Baseline57.3%
SideQuestions79.5%+22.2
clef-flashaccuracygain
Baseline50.2%
Jev’s questions75.0%+24.8
SideQuestions75.9%+25.8
djevaccuracygain
Baseline50.2%
Jev’s questions74.5%+24.4
SideQuestions73.0%+22.8
pplx-decider-v1.3accuracygain
Baseline56.6%
Jev’s questions82.3%+25.8
SideQuestions83.6%+27.0
0%20%40%60%80%100%

Accuracy on 640 held-out hotel reviews. “Jev’s questions” are the side questions found on Jev, with the regression model refitted to each model’s answers.

The side questions also transfer between models. The questions found on Jev, with the regression model refitted to each model’s answers, score 75.0% on clef-flash, 74.5% on djev and 82.3% on pplx-decider. Each of those scores is within 1.6 points of a fresh compile on the same model.


Like dspy-wsp, SideQuestions is a prototype optimizer. There’s a few limitations, including the ability to only optimize programs consisting of a single Predict call, but the scores it achieves are very impressive. We would appreciate your feedback and suggestions, where SideQuestions works well, and where it could be improved. The GitHub repository has more detailed usage instructions, benchmarks to replicate, and more.