Skip to content

Improve MNE system prompt: supported data types and 'I don't know' behavior #250

@neuromechanist

Description

@neuromechanist

Problem

The MNE assistant's system prompt lacks information about which data modalities and specialized submodules MNE supports. This leads to two failure modes observed in mne-tools/mne-python#13702:

  1. False negatives: The assistant claims MNE doesn't support something it does (e.g., "MNE-Python doesn't have built-in functions specifically for converting eyetracking pixels to visual angle" when mne.preprocessing.eyetracking.convert_units exists).

  2. Overconfident wrong answers: Instead of saying "I'm not sure, let me search," the assistant confabulates plausible-sounding but incorrect answers (e.g., claiming the BDF status channel is "automatically parsed" when it is not).

Proposed Changes

1. Add supported data types and submodules to system prompt

The system prompt mentions MEG, EEG, sEEG, ECoG, and NIRS but omits newer/specialized modalities. Add:

## Supported Data Types and Specialized Modules

MNE-Python supports these data modalities and has specialized submodules:
- **MEG**, **EEG**, **sEEG**, **ECoG**, **NIRS**, **Eye-tracking**

When users ask about these topics, ALWAYS search the docstring database before answering.

2. Improve uncertainty handling in the prompt

Add explicit instructions for when the assistant is unsure:

## When You Are Unsure

- If your tools return no relevant results for a question, say "I wasn't able to find documentation on this specific topic" rather than generating an answer from general knowledge
- NEVER claim MNE does or does not support something without first searching the docstring and documentation databases
- If a search returns partial results, present what you found and note what you couldn't verify

3. Add eyetracking tutorials to documentation sources

The config has no eyetracking tutorials in the documentation list. Add:

- title: Working with eye-tracking data
  url: https://mne.tools/stable/auto_tutorials/preprocessing/90_eyetracking_data.html
  category: preprocessing
  description: Processing and analyzing eye-tracking data with MNE-Python.

Acceptance Criteria

  • System prompt includes supported data types and specialized submodules
  • System prompt has explicit "when unsure" instructions
  • Eyetracking tutorials added to documentation sources
  • The eyetracking conversion question no longer produces a false negative
  • The BDF status channel question no longer produces a confidently wrong answer
  • Changes tested on dev before deploying to prod

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Priority 1: Critical, fix as soon as possiblechat-experienceenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions