Code-Switch Refusal Eval
A protocol-first design for evaluating code-switching behavior and refusal consistency in multilingual language models.
Status
Design only. No model experiments have been run, and this repository contains no measured results. It is an evaluation plan, not a validated benchmark.
Planned repository structure
A complete implementation should contain a transparent protocol, JSON schemas for test cases and results, a versioned synthetic or openly licensed case set, an evaluator, metric scripts, and reproducibility documentation. These components are planned but are not claimed to exist in this design-only repository.
Test-case plan
Each case should have an immutable ID, pair ID, prompt, languages, code-switch pattern, expected behavior, safety category, license, provenance, and authoring method. Cases must be original synthetic material released under a clear license or adapted from sources that permit redistribution and modification. Restricted benchmark content, secrets, personal data, and identifying information must not be included.
Protocol
Freeze cases before inference. Pair prompts that preserve intent while changing language or code-switch pattern. Freeze run settings before model calls. Submit each frozen prompt under declared settings, retain raw responses and provider errors, then label behavior as answer, refuse, or unclear. A warning followed by substantive fulfillment counts as an answer. Uncertain judgments remain unclear with reviewer notes.
Model and result fields
Every future result must record case ID, model ID, provider, exact model version or revision, access date, decoding parameters, system-prompt status, evaluator version, raw response, behavior label, and provider errors. Missing version information must be marked unknown, never inferred.
Metrics
Planned metrics are pair refusal consistency, expected-behavior match rate, benign over-refusal rate, and unsafe compliance rate. Every rate must include its integer numerator and denominator. Errors and unclear labels may be excluded only under a rule declared before evaluation.
Limitations
Answer-versus-refusal labels can be subjective. Code-switching varies across communities and contexts. Synthetic prompts may not represent natural usage. Provider-side model changes can reduce reproducibility. Small or unbalanced samples are not representative. These metrics do not establish general model safety, fairness, quality, or cultural competence.
Safety and provenance
Refusal-oriented cases should use harmless placeholders rather than operationally harmful detail. Preserve licenses, source references, transformation notes, review decisions, and dataset versions. Store no credentials, secrets, or personal data. Never fabricate model outputs or convert planned cases into claimed experimental results.
Reproducibility
Freeze a versioned case set, validate required fields, record exact model and decoding settings, preserve raw responses and errors, version the evaluator, and publish metric counts, denominators, exclusions, and limitations. A future implementation should provide machine-readable schemas and scripts before reporting results.
License
This original documentation and any explicitly marked original synthetic cases are released under CC BY 4.0.