Skip to content

Proposal: correctness benchmark + reviewed skill files for AI assistants (outside core) #14428

Open

Description

@PragnyaKhandelwal

Hi all,

AI assistants and MNE keep coming up, both here and on the forum. I went back through the earlier discussions and wanted to suggest something concrete that I think addresses the concerns raised there.

What's been discussed so far

The common thread for me is that nobody can currently say how often these tools are wrong for MNE questions. Our users are already using ChatGPT, Claude, Copilot etc. whether we recommend them or not, so I think measuring that is more useful than adding another tool.

What I'd like to try

  1. A small benchmark. Real MNE questions (from forum threads and known pitfalls like the BDF status channel, filtering epochs vs. raw, ICA on high-passed data, decoding/CV leakage, choosing an inverse method), each with clear pass/fail criteria checked by someone who knows the topic. Where possible, questions would ask for code that has to run and give a checkable result, rather than free text. Plus a simple script so anyone can rerun it with whatever model they already use. No API cost to the project. This could also give us actual data for deciding on Add OSA chat widget to documentation #13702.
  2. Reviewed skill files. Plain Markdown notes on MNE best practices and common mistakes, linking back to our tutorials, and only marked stable after someone experienced has reviewed them. The benchmark would show whether they actually help.
  3. Kept outside core. A separate experimental repo, either under mne-tools if people are comfortable with that, or under my account to start with. No new module, no dependency, nothing in mne itself, and no MNE branding on a chat bot.

How I'd go about it

I'd start small, with 20 questions, one draft skill file, and a comparison of 2–3 assistants (with and without existing skills like ClaudeEEG) graded by hand, and post the results here. If that's useful, I'd expand it into a fuller set. I'm happy to do this as volunteer work. If it turns out well and someone is interested in mentoring, it might also make a reasonable GSoC 2027 idea.

Where I'd appreciate your input

  • Does this direction sit OK with the Steering Council's earlier position, or are there concerns I'm missing?
  • mne-tools repo or personal repo to start?
  • If you have favourite "everyone gets this wrong" questions from the forum, I'd love to collect them for the pilot.

Thanks, and no rush on this. I know everyone's bandwidth is limited, so I'd rather get the scope right before starting.

Activity

  1. brovelli commented on Oct 19, 2026

    @brovelli

    Very good initiative. I think it would be a good idea for a GSoC 2027 projet. I am open to join if needed.

    If it may help for your development, I recently created a Claude Code Plugin called Braina which is expert in brain interaction ananlysis using two packages: Frites (https://github.com/brainets/frites) and HOI (https://github.com/brainets/hoi). Here is the link of Braina, it may give you some ideas of how to structure your projet.

    https://github.com/brainets/braina

    Note that we are currently testing it. Feedback is more than welcome. And it would be great if we could coordinate the mne-python and/or mne-connectivity agentic tools with Braina.

  2. PragnyaKhandelwal commented on Oct 21, 2026

    @PragnyaKhandelwal
    ContributorAuthor

    Thanks @brovelli, really glad you're interested, and thank you for sharing Braina. I'll look through how it's structured. Coordinating with mne-connectivity is a good idea, since connectivity analysis has a lot of the subtle pitfalls that a benchmark and reviewed skills could cover. I'd be happy to have you involved as the pilot takes shape.

    On GSoC: I think that's a lovely idea if the maintainers and community want it, but this doesn't depend on it. I'm happy to start the pilot now as volunteer work, and if it turns out useful, others could build on it later, with or without a GSoC slot.

    One more reference I should have linked: @drammock's comment in #13702 asked for exactly this kind of work: generating a set of questions, finding where the tools make mistakes, and using those failures to spot unclear parts of our docs. So I'd add that as an explicit output of the pilot: a list of doc pages that tripped up the assistants, with suggested fixes. That way the work improves the docs for human readers too, regardless of which (if any) AI tool we end up recommending.

    @drammock @larsoner @britta-wstnr, since you've been closest to the earlier discussions, I'd value your view on whether this direction (benchmark and reviewed skills outside core) is something you'd be comfortable with, and whether mne-tools or a personal repo is the better place to start. I'm glad to begin small either way, and to adjust the scope based on your feedback.

  3. tsbinns commented on Oct 21, 2026

    @tsbinns
    Member

    @brovelli @PragnyaKhandelwal If you want to coordinate anything regarding MNE-Connectivity, feel free to tag me, since I'm the main maintainer of that currently

  4. drammock commented on Oct 21, 2026

    @drammock
    Member

    thanks for the initiative @PragnyaKhandelwal (and thanks for sharing Braina @brovelli!) We'd like to discuss this in our next steering council meeting, which is late next week. Stay tuned.

  5. PragnyaKhandelwal commented on Oct 21, 2026

    @PragnyaKhandelwal
    ContributorAuthor

    Thank you @drammock and @tsbinns, thanks for bringing this to the Steering Council. I'm happy to adjust the scope to whatever the council is comfortable with. If it's appropriate, I'd also be glad to join the part of the meeting where this is discussed, in case there are questions I can answer directly. If that isn't possible, that's completely fine. Could you let me know the day and time of the meeting either way?

  6. PragnyaKhandelwal commented on Nov 3, 2026

    @PragnyaKhandelwal
    ContributorAuthor

    Hi @drammock, a gentle follow-up on this. I know the Steering Council meeting was due around now, and I'm sure things get busy. If there's any update or feedback on the direction, I'd be glad to hear it, and no worries at all if it needs more time. I'll keep holding off on building until then.

  7. drammock commented on Nov 3, 2026

    @drammock
    Member

    thanks for the nudge @PragnyaKhandelwal. We didn't get a full discussion of this at the last SC meeting as some folks were absent. It's high on my list of topics though, so rest assured we will come back to it.

  8. drammock commented on Nov 6, 2026

    @drammock
    Member

    @PragnyaKhandelwal we had a chance to talk this over some more. we think the benchmark first (which can then be used to test the influence/improvement from a skills file) is a good approach and encourage you to run with it. For now feel free to use your own repo, you can always transfer it into the mne-tools org later if/when it makes sense to do so.

    FWIW, my guess is that initial tests may be quite positive (models are getting better, and if you source the benchmarks from the forum, that's material that the latest models likely already have ingested). But we won't know for sure until we look, and if that happens we can start to branch out into more complex/niche questions to probe the boundaries.

  9. PragnyaKhandelwal commented on Nov 7, 2026

    @PragnyaKhandelwal
    ContributorAuthor

    @PragnyaKhandelwal we had a chance to talk this over some more. we think the benchmark first (which can then be used to test the influence/improvement from a skills file) is a good approach and encourage you to run with it. For now feel free to use your own repo, you can always transfer it into the mne-tools org later if/when it makes sense to do so.

    FWIW, my guess is that initial tests may be quite positive (models are getting better, and if you source the benchmarks from the forum, that's material that the latest models likely already have ingested). But we won't know for sure until we look, and if that happens we can start to branch out into more complex/niche questions to probe the boundaries.

    Thanks @drammock, and thanks to the council for taking the time. I'll start with the benchmark in my own repo, sourcing questions from the forum first, and share a first small set here for feedback before going further. Good point about newer models having likely seen that material. I'll make sure the question set also includes harder and more niche cases so we can see where the limits are.

  10. brovelli commented on Nov 9, 2026

    @brovelli

    Dear all,
    I will recruit a research assistant who will work on AI tools for neurophysiology and we will be able to give a hand with this project. He will start in Jan 2027 until end of May.
    Please keep me in the loop about the work plan and project details. We may be able to contribute.
    Cheers

  11. PragnyaKhandelwal commented on Nov 10, 2026

    @PragnyaKhandelwal
    ContributorAuthor

    Hi all, here's a first update on the benchmark. The pilot is done and everything is public: https://github.com/PragnyaKhandelwal/mne-assistant-benchmark

    Setup
    24 questions: 15 from solved forum threads, plus known pitfalls and one MNE 1.13 version question. For 13 of them, the assistant's code is run automatically on synthetic data and checked. The other 11 are graded by hand against written criteria. I tested three free assistants (Gemini Flash Lite, Claude Sonnet 5.5, ChatGPT free), with one attempt per question in a fresh chat.

    Main findings

    These patterns came up across all three assistants:

    • The 1.13 montage rename (standard_1020/standard_1005) caused 7 of the 23 failures. All three used the old names even when the prompt said "1.13".
    • @drammock, your guess seems right: all three did worse on recent forum topics (2024-26) than on older ones. The samples are small, so I'd read it as a trend.
    • Classic forum mistakes still show up: reusing the original events after resampling, and fitting ICA on unfiltered data.
    • None of them answered the mean_flip on dSPM question (forum 11491) correctly.
    • There were a few non-existent arguments and confident but wrong claims about MNE behaviour. I checked each against the source.

    The doc pages these point to are collected in doc_findings.md.

    Transparency and an ask for help

    I want to be upfront about one thing. I used Claude Code to help build the questions and checks, and it also suggested the hand grades. Claude is one of the tested assistants, so that's a real conflict of interest. RESULTS.md lists every decision that affected scores, and the hand grades are marked provisional. I don't think the scores should be read as a ranking anyway, because the differences are within the run-to-run variation I saw.

    To make the results trustworthy, I'd really appreciate independent grading from people who know MNE well. There's a blind sheet with the 11 hand-graded questions, where the replies are shuffled and the assistant names are removed: GRADING.md in the repo. Even grading one question helps, and so does feedback on whether the criteria themselves are right.

    @brovelli, thank you for the offer, and it's great news about the research assistant. I'll keep you in the loop and share a short work plan for Jan–May here once the next steps are clearer.

    Questions for @drammock

    1. Grading: I used a strict rule, so a wrong definite claim fails even if the right answer is also given. Is that the right standard, or should only the main recommendation count?
    2. Since assistants (and probably many older scripts) still use the old montage names, would temporary aliases or a "did you mean ...?" hint in the error be worth considering? Or is that out of scope?
    3. Next step: which would help most: (a) the same set against OSA (and Kapa, if available) to inform Add OSA chat widget to documentation #13702, (b) harder or more niche questions, or (c) testing a skills file against this baseline?
    4. Would small doc PRs based on doc_findings.md be welcome?
  12. larsoner commented on Nov 30, 2026

    @larsoner
    Member

    I don't think we have the bandwidth to grade manually at the moment. I think we can live with the slightly circular Claude-checking-claude for now. I would suggest for example using different models (e.g., Fable or Opus for ground truth, with Opus or Sonnet, respectively, as the one trying to answer questions) as a way to make it slightly more independent.

    Is there a way to test some open-source model, i.e., something not paywalled that a user could reasonable run locally on their own system? It would be great to know how these things work on open-source models.

    As to the specific questions:

    1. Yes I think hallucinating incorrect answers is a problem. Better to have less info that is more correct.
    2. I wouldn't worry too much about old vs new. It would be great if they could get it right but if they use an old name and the code would still work that's okay. (Even humans aren't 100% up to date on changes all the time.)
    3. Yes I think testing OSA would be good (in addition to any local-runnable open-source models that would make sense).
    4. I can't see doc_findings.md (I think it's your local file?) but if the idea is that our docs have some errors and / or missing info that should be filled in that improves AI performance, then yes I think small PRs are welcome. We maintainers can view them from the "would this also help end-users" perspective, and I think the answer is likely to be "yes" in most cases, and thus everybody benefits!
  13. cbrnr commented on Nov 30, 2026

    @cbrnr
    Contributor

    I agree with @larsoner. At this point, I think we can (and should) (1) try to make the docs more accessible and correct so that AI can use it more efficiently and (2) evaluate how free open-source models perform (since the latest frontier models by Anthropic and OpenAI perform so well that we don't have to benchmark anything).

  14. brovelli commented on Nov 30, 2026

    @brovelli

    Open-source models
    Regarding testing open source models, I use OpenCode CLI https://opencode.ai/ where you can test free models (on the cloud) or locally on your PC (if you install them through ollama). I don't know it that may help.

  15. PragnyaKhandelwal commented on Dec 1, 2026

    @PragnyaKhandelwal
    ContributorAuthor

    Thanks @larsoner, @cbrnr and @brovelli, this is really helpful.

    A correction first. While re-running the benchmark I found a mistake on my side: the first results were scored against a development install of MNE (main, 1.14.dev) instead of 1.13. Its version string still said 1.13.0.dev, so I didn't notice. main has already removed standard_1020/standard_1005, but in released 1.13.x they still work with a FutureWarning. So the "montage rename caused 7 of 23 failures" finding was wrong, and I've withdrawn it. Sorry for the noise.

    I re-scored with mne==1.13.2 (on main the original automatic results reproduce exactly, so the version was the cause) and applied your point 2 to the one hand-graded montage question. Strict totals are now Gemini 19, Claude 20, ChatGPT 15 of 24. The repo now pins the version and warns on development installs. Details: RESULTS.md.

    doc_findings.md is in the repo; I should have linked it: https://github.com/PragnyaKhandelwal/mne-assistant-benchmark/blob/main/doc_findings.md

    @cbrnr, agreed. The corrected numbers point the same way: most questions pass, but every assistant still made at least one confident wrong claim about MNE (for example, an argument that doesn't exist).

    On your points

    1. Grading: understood, I won't ask for manual grading. I'll do cross-model grading as you suggest (a stronger model grading a weaker one's replies, plus a grader from another model family), report the agreement with the current grades, and check each disagreement against the source. I'll keep the strict rule.
    2. Old names: agreed. Answers with old names that still work now pass; the runner only notes the deprecation warning.
    3. Open-source models and OSA: I'll do these next.
      • I added a small script that sends the same prompts to a local model server (Ollama, llama.cpp, LM Studio), with three runs per prompt, since single runs turned out to be noisy. I'll start with models that run on an ordinary laptop (up to about 8B parameters, quantized). If there are open models you'd especially like to see, I'm happy to include them.
      • @brovelli, thanks for OpenCode. I'll start with plain chat so the results compare with the web assistants; OpenCode would be a good second setting, where the model can run code itself.
      • @neuromechanist, I'd like to run the same 24 prompts through OSA's MNE setup. Is there a configuration or model you'd consider representative of what users get, and a preferred way to send a batch of prompts?
    4. Doc PRs: thanks! I'll start with small ones that should also help human readers:
      • extract_label_time_course: say when not to use mean_flip. None of the three assistants got this right (forum 11491), and the default mode="auto" uses mean_flip for magnitude estimates such as free-orientation dSPM.
      • The template-MRI tutorial: a one-line note that cap montages such as biosemi64 are idealized spheres and won't line up with fsaverage. This was the cause in forum 11887, and two of the assistants recommended such montages.
      • adjacency=None in the cluster tests: one sentence saying it is rarely right for sensor or source data.

    Plan for the next months (@brovelli, as promised)

    • December: open models that run on a laptop, OSA, cross-model grading, the first doc PRs.
    • January–February: larger open models, repeated runs, and harder or more niche questions (for example connectivity, coordinated with Thomas).
    • March–May: test a skills file against this baseline, as Dan suggested.

    My laptop is CPU-only, so running larger open models (around 20–30B) is where help would make the biggest difference, along with harder questions from people who work in those areas.

  16. neuromechanist commented on Dec 1, 2026

    @neuromechanist
    Contributor

    Great initiative.

    I'd like to run the same 24 prompts through OSA's MNE setup. Is there a configuration or model you'd consider representative of what users get, and a preferred way to send a batch of prompts?

    OSA models get regular updates. Currently, we offer both Haiku 5.5 (default) and Sonnet 5.5 free of charge to all communities.
    OSA also has a CLI, so you can install and run it programmatically; you need to BYOK for the CLI mode though.

    Others, like NWB also made such benchmarks (see OpenScience-Collective/osa#514), but mainly to choose which model they want to choose for their assistant.

    OSA's promise is transparency. If there is something not shown correctly, prompts, docs access, model, or even effort can be adjusted.
    I made a minimal effort (with help of an AI agent) to onboard MNE, with daily/weekly lookups from Discourse, PRs and papers. Feel free to improve.

  17. PragnyaKhandelwal commented on Dec 2, 2026

    @PragnyaKhandelwal
    ContributorAuthor

    Thanks @neuromechanist, that's very helpful. I see MNE is already set up as a community in OSA (mne, Haiku by default, around 30 doc pages plus Discourse), so I'll test it as it is.

    My plan:

    • Run the same 24 prompts through the OSA CLI with -a mne, using my own key, three runs each, and score them with the same checks as the web assistants.
    • Start with Haiku, since that's what users get by default. Is there a way to choose Sonnet from the CLI, or is the model only set on the server?
    • Record the OSA version and settings with the results. If a failure looks like a docs-access or prompt problem on the OSA side, I'll report it so it can be fixed there.

    OSA uses Claude models, so comparing it with plain Claude should show how much the doc access helps by itself. The NWB comparison in OpenScience-Collective/osa#514 is a useful reference for the setup.

    A quick update: the first doc PR (mean_flip, #14621) is merged, thanks @larsoner. The other two (cluster-test adjacency and the template-MRI montage note) are #14628 and #14629

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions