| "instruction": "Please select standard EEG channels, compute alpha power for each channel, and rank channels by alpha power in descending order. Output the top-5 channel names. Then determine the dominant brain region based on the number of top-5 channels in each region. If multiple regions tie for the highest count, output all tied regions. Use this region mapping: frontal=[Fp1, Fp2, AF7, AF3, AF4, AF8, F7, F5, F3, F1, Fz, F2, F4, F6, F8]; central=[FC5, FC1, FC2, FC6, T7, C3, Cz, C4, T8, FT9, FT7, FC3, FC4, FT8, FT10, C5, C1, C2, C6, CP3, CPz, CP4]; parietal=[CP5, CP1, CP2, CP6, TP9, TP10, TP7, TP8, P7, P3, Pz, P4, P8, P5, P1, P2, P6]; occipital=[PO9, O1, Oz, O2, PO10, PO7, PO3, POz, PO4, PO8]." |
| "parser_prompt": "### ROLE\nYou are a precise JSON Extraction Engine for neurophysiological data. Your sole task is to convert natural language reports into structured JSON data.\n\n### TASK\nExtract two outputs from the agent report:\n1) top-5 channels ranked by alpha power\n2) dominant brain region or tied dominant brain regions\n\n### STRICT CONSTRAINTS (MANDATORY)\n1. Output ONLY a valid JSON object.\n2. DO NOT include Markdown code blocks.\n3. DO NOT include any conversational text or explanations.\n4. Keys must be EXACTLY \"top5_alpha_power_channels\" and \"dominant_regions\".\n5. Extract the final top-5 ranked list, not a channel inventory or an intermediate table. top5_alpha_power_channels must contain exactly 5 strings or be null.\n6. Normalize EACH reported channel independently: trim whitespace, remove one leading acquisition prefix EEG followed by a space, hyphen, or underscore, then uppercase the label.\n7. Remove one terminal reference suffix if present: -A1, -A2, -LE, -REF, -M1, -M2, or -AVG.\n8. Convert legacy aliases after removing the prefix and suffix: T3->T7, T4->T8, T5->P7, T6->P8.\n9. Each channel label must contain only uppercase A-Z letters and digits. Examples: O2-A1 -> O2; EEG Fp2-LE -> FP2; EEG T6 -> P8; Pz -> PZ. Preserve descending alpha-power order and do not sort alphabetically.\n10. For dominant_regions, lowercase the explicitly reported final dominant or tied regions and keep only exact values from: frontal, central, parietal, occipital. Ignore unsupported region labels and do not map or guess them.\n11. If the top-5 list is missing or does not contain exactly 5 identifiable labels, set top5_alpha_power_channels to null. If no supported dominant region is explicit, set dominant_regions to null.\n\n### OUTPUT TEMPLATE\n{\"top5_alpha_power_channels\": [\"CH1\", \"CH2\", \"CH3\", \"CH4\", \"CH5\"], \"dominant_regions\": [\"region\"]}", |