Transition the overall tech stack to AISI Inspect framework, or any other off the shelf tooling?
In my opinion, I think a shift towards using off-the-shelf tooling for evals would be really helpful! Compared to the good deal of seemingly custom-written code, with only basic packages imported, I see in the current huggingface.
When it comes to off-the-shelf tooling, I could quite highly recommend the Inspect ecosystem from UK AISI: https://inspect.aisi.org.uk/. I've used it quite a bit to build ai evals myself, it is open source with a very strong contributor base, it has close ties to the ai safety community, and most importantly, it has so many features!
And not just features for building the eval itself, but also extensions for validating the evals to see whether it really measures what you want to measure. https://inspect.aisi.org.uk/extensions/
There's even a vscode plugin, so you can pull up transcripts of model and judge outputs directly on vscode with a click: https://inspect.aisi.org.uk/vscode.html
Of course this transition, if it happens, shouldn't be all at once or without consensus, but somewhat gradually.
What do you all think?
I would love to take the lead on this if it goes through.
I think this could be useful, but before moving to this framework I would like to understand what pain points we are trying to solve first.
Like, the corpus management side (schema.json, validate_questions.py, check_duplicates.py, assign_ids.py, contribution workflow, etc.) already seems fairly lightweight to me. I am not sure Inspect would help much there.
It can be used for eval, when we start running more models and more pressure-turn experiments, multiple samples per question, etc. Transcript inspection also seems interesting since we would have to analyze where the model changed its position rather than just looking at a final score.
One thing I want to know is how our benchmark metrics would fit into Inspect. For eg, we report divergence rate, abstention rate, concession rate & retreat rate, along with the model's behaviour across multiple pressure turns. Does Inspect provide abstractions that make this easier or would we still need to implement most of this logic ourselves?
I would just like to understand what problems we are facing today, or expect to face as the benchmark grows, that Inspect would solve better than the current setup. If you could provide an example, that would be very helpful!
๐ค Drafted by an AI assistant on behalf of @Emar7 , per the convention in #40.
divyanshijoshi's question is the right one to answer first, so here is what I found checking the Inspect docs against what the repo does today.
What Inspect would give us, concretely:
- Repeated sampling is built in.
Epochs(5, reducer)runs every sample k times, with reducers includingmean,mode,majority,at_least_k,pass_at_kandcollect. That covers most of what #38 implements by hand insummarize_samples(). - Multi-turn is supported but custom. There is no built-in multi-turn solver; pressure turns would be a small
@solverthat callsgenerate(), appends each scriptedChatMessageUser, and callsgenerate()again. Straightforward. - Transcripts and logs. This is the strongest argument. With pressure turns, the interesting question is where a model moved, and a log viewer that shows the full exchange per sample is far better than grepping JSON.
- Provider plumbing: model APIs, retries, rate limits and concurrency, which we have not written yet and would otherwise have to.
What it would not give us:
- Corpus tooling.
validate_questions.py,check_duplicates.py,assign_ids.pyand the contribution flow are unaffected either way. - Our metrics. Divergence, abstention, concession and retreat rates are ours. They would be custom
@metricfunctions. The judge also stays ours: Inspect'smodel_graded_qais a correct/incorrect grader, while our judge needs the three labels plus thediverges_ifchecklists, soeval/judge_prompt.pywould sit inside a custom scorer.
One real trap to know about before designing it. The docs say Score.metadata "will always be reduced to the value of metadata in the first epoch" when epochs are reduced. The natural place to put per-turn labels for a pressure sequence is metadata, and doing so would silently keep only the first sample's trajectory once k > 1. Per-turn labels would need to live in a dict-valued Score.value, or be reduced with collect. It is exactly the kind of issue that would produce plausible-looking concession rates that are wrong.
What I'd suggest: a thin adapter rather than a migration. eval/judge_prompt.py and eval/score_outcomes.py are pure functions with tests, so they can be called from an Inspect scorer and metric unchanged. A pilot that runs the merged single-turn items through Inspect with our judge would answer divyanshijoshi's question with evidence. If the pilot ends up reimplementing the judge prompt or the scoring logic, that is a sign Inspect is not buying us much there. If it only wraps them, we get the log viewer and provider plumbing nearly for free. I'd also resolve it before #38's summarize_samples() grows further, since Epochs would overlap with it.
Happy to help with the pilot alongside JoyeeChen, particularly the multi-turn solver and scorer, since I wrote the pressure_turns side.
Looking at the UK AISI's Inspect documentation, I think this could be a very helpful abstraction. We don't really need to migrate anything. The inspect framework accepts data types of all kinds.
After setting the schema, we will be moving onto the evaluation suite. I like how Inspect decomposes this into Solvers and Scorers. Looking at the solver documentation, it seems reasonably easy to implement multi-turn (which would be our highest complexity task). We will need to build a custom solver with their building blocks.
The scorer is basically the same. We probably cannot use the off-the-shel scorer, but the custom one seems easy enough.
Personally, I think this could help us resolve bugs faster when implementing the eval suite. My concern would be on how heavy it is.
I've been following this discussion, and I'd be interested in helping with a small Inspect pilot from the judge-reliability side.
We already have the single-turn and multi-turn regression fixtures, along with the runner changes in #50, so there should be a useful baseline to compare against. I'd like to check whether an Inspect implementation preserves the existing prompt construction, verdict parsing, and handling of invalid outputs.
I'm also interested in how we'd retain individual judgments across repeated runs and the full conversation history for multi-turn cases, since we'll need those for analyzing judge consistency and failure modes.
Once the evaluation interface is clearer, I'd be happy to run a small parity test against the existing runner. That should help us identify any differences before committing to a larger migration.
Sorry for the late response! I should be able to get to work on this tomorrow (Friday California time), but in the meantime any help would be appreciated.
@Emar7 thanks for your offer! Why not you take until Friday 23:59 UTC to give Inspect-ifying the solver and scorer a try? Don't worry if you can't complete it in the soft deadline; just let me know if you want to continue with it or defer this task to me or ask me for help; otherwise I'll start on it. Put this as a stationhouse-app task if needed.
(But note: according to Inspect's concepts of objects in Components section https://inspect.aisi.org.uk/, the solver and scorer rely on a dataset object, so it might be best to Inspectify the dataset/questions then solver then scorer.)
In my opinion (and to answer, empirically, concerns that we're moving too fast) it's best that we create two parallel code-systems during the "inspect trial period" -- the current noninspect code, and inspect versions? (This can take the form of parallel folders etc)
@melover24 it might be best to wait until after Emar7 has finalized and tested their code a bit before you start Inspect-ifying judge-reliability? Just to work out a good enough Inspectified code
Sorry for missing the Friday deadline. If you haven't started yet, I'd still like to take the dataset, solver and scorer as a first pass in a parallel inspect_eval/ folder, following your ordering, and have a PR up by Tuesday. If you've already begun, I'm equally happy to take just the multi-turn solver and scorer on top of your dataset.
Sorry for the late reply! @Emar7 nice first pass I see already executed thanks. I haven't quite begun and I think I can only contribute Tuesdays-Thursdays.