# EXBABEL — UNITED NATIONS DIPLOMATIC TRANSLATION ACCURACY BENCHMARK

## Your Role

You are a senior AI speech systems engineer, computational linguist, machine translation evaluation researcher, and quality assurance architect.

Your assignment is to **implement, execute, evaluate, and document a scientifically defensible multilingual speech-to-speech translation benchmark for Exbabel Events** using authentic United Nations materials.

This benchmark will support an upcoming Exbabel Events presentation to United Nations stakeholders.

We want objective, reproducible evidence about whether our translation systems can accurately interpret diplomatic speeches, preserve critical meaning, and perform reliably in real time.

**This is an execution assignment, not a research-only assignment.**

You must inspect the provided files, improve the existing test harness, retrieve authorized test materials, execute real API inference where credentials permit, calculate actual metrics, and generate a professional evidence report.

Never invent results or describe unexecuted functionality as tested.

---

## 1. PROJECT FOLDERS

I will provide the following folders:

**Benchmark kit:**

`[INSERT PATH TO EXBABEL UN BENCHMARK FOLDER]`

This contains the previously developed benchmark implementation, including:

- `README.md`
- `docs/PROTOCOL.md`
- `docs/SOURCE_REVIEW.md`
- `docs/RESULTS_SLIDES.md`
- `scripts/candidates.py`
- `scripts/prepare_audio.py`
- `scripts/run_stream.py`
- `scripts/score.py`
- `scripts/blind_review.py`
- `scripts/check_environment.py`
- `templates/`
- `tests/`
- `UN_Accuracy_Pilot_Tracker.xlsx`
- `UN_Validation_Workstream_Slides.pptx`

**Optional Exbabel production repository:**

`[INSERT PATH TO EXBABEL SOURCE CODE]`

If provided, inspect the existing OpenAI and Gemini integration, audio-processing architecture, transcription pipelines, model configuration, credentials management, and translation routing.

Do not modify production endpoints, database records, or deployment infrastructure.

Create an isolated benchmark environment. Reuse existing audio and translation components where beneficial, without affecting production behavior.

### Initial instructions

1. Read the complete README, protocol, existing scripts, sample templates, and evaluation requirements.
2. Audit the starter scripts for correctness, incomplete features, missing dependencies, and failure-handling defects.
3. Verify current API documentation rather than assuming the scripts are compatible.
4. Fix defects and extend the existing benchmark.
5. Preserve useful work already implemented; do not unnecessarily rebuild the project.
6. Run the offline tests before attempting live inference.

Proceed autonomously wherever sufficient information and authorization are available. Ask for human input only when it is genuinely required.

---

## 2. PRIMARY RESEARCH OBJECTIVE

Evaluate the following speech translation engines:

**System A — OpenAI**

- Model: `gpt-realtime-translate`
- Dedicated Realtime Translation API
- Streaming speech-to-speech interpretation
- Native translated speech and transcript output

**System B — Google Gemini**

- Model: `gemini-3.5-live-translate-preview`
- Gemini Live Translation API
- Streaming speech-to-speech interpretation
- Native translated speech and transcript output

Validate both model IDs, account availability, documentation, endpoint configuration, and target-language capabilities before execution.

Where a model is unavailable, record the reason rather than silently substituting a different model.

**System C — Exbabel production translation pipeline (optional but strongly recommended)**

If the Exbabel repository is available, create a third adapter that evaluates the actual customer-facing translation pipeline, including routing, prompts, STT, TTS, glossaries, and fallback providers.

This is important because Exbabel's production configuration may perform differently from either provider's standalone translation model.

Report the three systems independently.

### Questions we must answer

- How accurately do the systems translate authentic diplomatic speech?
- Do they preserve the speaker's intended meaning?
- Do they reproduce names, numbers, acronyms, and diplomatic terminology?
- Do they introduce omissions, additions, or hallucinations?
- How accurately do they preserve negation, legal obligations, and policy positions?
- How does their performance vary across the six official UN languages?
- How fast do accurate interpretations become available?
- How do they compare with professional human interpretation?
- How understandable and natural is the generated audio?
- Which errors are potentially consequential for diplomatic decision-making?

We are not trying to generate the highest possible score. We want defensible evidence of actual system performance.

---

## 3. OFFICIAL RESEARCH RESOURCES

Use these four resources as the primary evaluation foundation.

### Resource A — UN Transcription Corpus

https://huggingface.co/datasets/united-nations/transcription-corpus

Contains authentic UN General Debate and meeting recordings, available simultaneous human interpretation channels, and some official records.

Use these recordings for the **primary real-world speech-to-speech benchmark**.

Retrieve dataset metadata and identify:

- Original delivered language
- Original source audio
- Available human interpretation recordings
- UN document symbols
- Meeting dates
- Speaker and country information where available
- Corresponding official text
- Reliable timestamps

Do not assume that an English audio channel is always the original speaker. Verify source-versus-interpretation routing.

Do not assume edited UN meeting records are verbatim audio transcripts.

Verify applicable media-use terms before transmitting recordings to AI providers or redistributing evaluation samples.

### Resource B — United Nations Parallel Corpus

https://www.un.org/dgacm/en/content/uncorpus

Download page:

https://www.un.org/dgacm/en/content/uncorpus/Download

The corpus contains professionally translated UN material across all six official languages.

Investigate and retrieve the appropriate fixed evaluation sets, including `UNv1.0.testsets.tar.gz`, if accessible.

Use this corpus to create a **separate controlled diplomatic language stress test**.

It can provide:

- Professionally translated reference sentences
- Legal and diplomatic phrasing
- Formal institutional vocabulary
- Cross-language meaning comparisons

Because this is written material, do not incorrectly match these translations to unrelated speeches.

A separate read-aloud speech benchmark may be created from appropriately licensed texts using consented human speakers. Clearly label it as a controlled read-aloud test, not authentic UN meeting audio.

### Resource C — UNTERM

https://unterm.un.org/unterm2/en/

Create a curated multilingual diplomatic terminology reference.

Include terms relating to:

- General Assembly and Security Council procedures
- Diplomatic titles
- International humanitarian law
- Refugees and humanitarian assistance
- Peacekeeping
- Treaties and conventions
- International resolutions
- Human rights
- Climate agreements
- Country and institutional names

Capture official preferred translations, acceptable variants, language codes, entry URLs, and verification status.

Do not invent translations or assume bulk-export/API rights that have not been verified.

### Resource D — OpenSTBench

https://github.com/sjtuayj/OpenSTBench

Review and, where practical, integrate its professional translation evaluation framework.

Relevant evaluations include:

- sacreBLEU
- chrF++
- COMET
- Speech quality
- ASR-of-generated-speech accuracy
- Temporal and streaming latency measures

Record exact metric versions, model checkpoints, settings, and dependencies.

Keep the benchmark independently reproducible even if advanced evaluation packages are unavailable.

---

## 4. PILOT LANGUAGE MATRIX

Begin with the six official United Nations languages:

- English (`en`)
- French (`fr`)
- Spanish (`es`)
- Russian (`ru`)
- Mandarin Chinese (`zh`)
- Arabic (`ar`)

First create a complete 6 × 6 coverage matrix covering all 30 directed translation pairs.

For each system and language direction, document:

- Source audio support
- Target spoken audio support
- Native captions
- Model/version
- Glossary capability
- Tested versus documented support
- Unsupported combinations

### First execution batch

Prioritize:

| Source | Target | Initial samples |
|---|---|---:|
| English | French | 30 |
| French | English | 30 |
| Spanish | English | 30 |
| Arabic | English | 30 |
| Russian | English | 30 |
| Mandarin | English | 30 |

**Initial target: 180 authenticated UN speech segments, with both translation engines evaluated on the same segments.**

Use 15–60-second segments where feasible, with longer continuous-speech tests handled separately.

These are sampling targets, not permission to manufacture recordings, reuse duplicates, or mislabel speaker languages.

Add English → Arabic as a separate capability and fallback test. If OpenAI's dedicated model cannot produce Arabic speech, mark that system as `NOT SUPPORTED`; test Gemini and Exbabel's Arabic-capable fallback independently.

After the pilot, expand toward 100–300 utterances per priority language pair, subject to feasibility and reviewer capacity.

### Sampling requirements

Use a reproducible seeded selection method with stratification across:

- Country and speaker
- UN body and meeting type
- Diplomatic subject matter
- Accents
- Speaking speed
- Audio quality
- Formal versus spontaneous speech
- Numbers, dates, and percentages
- Names and acronyms
- Negation and legal obligations
- Interruptions and overlapping voices

Separate clean-speech and adverse-condition cohorts.

Freeze the eligible sample list before comparing model outputs.

---

## 5. REAL API EXECUTION

Implement reliable streaming adapters for both vendors.

### Audio preparation

Normalize the same original source clip for both systems, preserving semantic content and timing.

Use the required input formats:

- OpenAI: documented PCM16 input at 24 kHz
- Gemini: documented PCM16 input at 16 kHz

Preserve original files, derived files, hashes, timestamps, and processing logs.

Send audio at real-time speed for the principal benchmark, not as an artificially accelerated bulk request.

### Capture and save

For every system, sample, and language pair, save:

1. Input audio and provenance
2. Native translated speech WAV
3. Native translated caption/transcript
4. Input transcript where available
5. Raw streaming event timestamps
6. Exact model and configuration
7. Input/audio-output durations
8. First caption timestamp
9. First translated-audio timestamp
10. Completion and error status
11. Token, usage, and cost metadata where available
12. Relevant transport, buffering, and reconnect events

If translated audio is missing, contains the wrong language, or fails to complete, record it as a failed or incomplete run.

Do not silently omit these cases from coverage statistics.

### Fairness controls

Use identical source samples, comparable network conditions, and consistent evaluation methods.

Compare uncustomized model configurations first.

Then conduct a separate glossary-assisted or domain-adapted comparison if the models and actual Exbabel product support it.

Do not mix baseline and adapted results.

---

## 6. PROFESSIONAL TRANSLATION ACCURACY SCORING

Implement multiple independent evaluation dimensions.

### A. Automatic translation metrics

Calculate where valid references exist:

- Corpus-level BLEU using sacreBLEU
- chrF++
- COMET with a frozen checkpoint
- Optional BLEURT or other validated metrics

Record individual sample results where supported and corpus-level aggregate results.

Use suitable tokenization for each language, especially Chinese.

BLEU and COMET scores are not literal translation-accuracy percentages.

### B. Terminology accuracy

For each verified glossary occurrence, evaluate whether the translation used:

- The preferred UN term
- An approved equivalent
- An incorrect equivalent
- An omitted term

Calculate:

`Terminology accuracy = Correct or approved term instances / Adjudicated term instances`

Report separately by language pair and domain.

### C. Critical diplomatic meaning

Detect and require human review of:

- Incorrect negation
- Reversed diplomatic positions
- Wrong numbers or percentages
- Incorrect country or speaker names
- Wrong resolution identifiers
- Missing legal obligations
- Misinterpreted treaties
- Added or omitted commitments
- Material alterations to chronology
- Hallucinated statements

Assign severity using a documented MQM-inspired rubric.

Never treat an automated LLM judge alone as final evidence of diplomatic correctness.

### D. Source and output speech verification

Use independent speech recognition to assess whether the actual generated audio corresponds to its reported captions.

Use professionally corrected audio-accurate source transcripts for WER/CER where available.

Do not treat edited UN records as exact transcriptions.

Report native-caption accuracy separately from ASR-of-generated-audio accuracy.

### E. Speech quality

Evaluate:

- Intelligibility
- Naturalness
- Pronunciation
- Preservation of meaning in spoken output
- Audible omissions
- Voice stability
- Speaker attribution

Treat speech quality and translation quality as distinct measurements.

---

## 7. BLINDED BILINGUAL HUMAN REVIEW

Build the reviewer workflow and scoring interface or structured spreadsheet.

For each sample, reviewers should be able to access:

- Original speech
- Generated translation audio
- Generated translation text
- Verified source text
- Human-approved reference or meaning annotation
- Relevant approved terminology

Randomize and anonymize which system generated each result.

Use two independent qualified bilingual reviewers per scored sample, ideally with diplomatic or technical subject-matter expertise.

Reviewers must not see model identities or each other's ratings before submission.

Suggested rating dimensions:

| Dimension | Scale |
|---|---|
| Meaning adequacy | 0–4 |
| Terminology fidelity | Instance-level correct/incorrect |
| Names and numbers | Instance-level correct/incorrect |
| Omissions/additions | Count and severity |
| Speech intelligibility | 0–4 |
| Speech naturalness | 0–4 |
| Critical meaning errors | Count and severity |
| Listener comprehension | Predefined assessment |

Preserve both independent reviews.

An adjudicator must resolve disagreements without replacing the original review history.

If bilingual reviewers are not yet available, prepare the complete review packets and label human scores `PENDING`.

Do not substitute simulated or AI-generated reviewer scores.

---

## 8. REAL-TIME LATENCY AND RELIABILITY

Measure:

- Time to first meaningful caption (TTFC)
- Time to first translated speech (TTFS)
- p50/p95 first-output latency
- Source-phrase-end to translated-meaning availability
- Caption/audio synchronization
- Audio jitter
- Missing and duplicated content
- Translation backlog
- Long-speech drift
- Connection stability
- Reconnection and failover behavior

The distinction between first-output timing and meaningful phrase-level latency is mandatory.

For an extended test, run longer continuous UN speech recordings at normal speed and observe buffering, backlog, and incomplete outputs.

For network impairment, noise injection, interruptions, overlapping speakers, and failover, use reproducible conditions applied equally to each system.

If additional infrastructure is necessary, implement it where practical and document remaining gaps. Do not report unimplemented metrics.

---

## 9. PRE-REGISTER THE EVALUATION

Before conducting the final scored comparison, create a frozen preregistration document.

Record:

- Study ID and date
- Exact models and endpoints
- Source material versions and licenses
- Sampling methodology
- Random seed
- Intended sample sizes
- Exclusion rules
- Test language directions
- Model configuration
- Glossary conditions
- Human-review rubric
- Critical-error definition
- Planned metrics
- Statistical analysis methods
- Missing-data rules
- Acceptance criteria
- Security and confidentiality controls

Acceptance thresholds must be approved before scored evaluation results are inspected.

Do not invent United Nations approval or claim the UN agreed to a particular standard.

If UN reviewers are unavailable, distinguish Exbabel's provisional internal criteria from jointly agreed acceptance requirements.

Maintain separate development/tuning and held-out evaluation sets.

---

## 10. STATISTICAL VALIDATION

For each language pair and engine:

- Report exact sample counts
- Record successful, failed, and unsupported cases
- Calculate appropriate 95% confidence intervals
- Use Wilson intervals for binary proportions
- Calculate paired system comparisons on identical utterances
- Consider speaker-level clustering and bootstrap uncertainty
- Identify severe failure examples
- Separate exploratory findings from confirmatory claims

A zero critical-error count in a small sample does not establish zero risk.

Never create a single unsupported headline percentage such as “99% diplomatic accuracy.”

---

## 11. REPORTING AND PRESENTATION OUTPUT

Generate the following final artifacts.

### A. Research report

`EXBABEL_UN_TRANSLATION_ACCURACY_REPORT.pdf`

Include:

1. Executive summary
2. Research question and scope
3. Official source provenance
4. Model configurations
5. Language availability matrix
6. Sampling and reference methodology
7. Human accuracy evaluation
8. BLEU, COMET, and chrF++ results
9. Diplomatic terminology accuracy
10. Critical mistranslation analysis
11. Audio quality results
12. Latency and reliability
13. OpenAI versus Gemini versus Exbabel comparison, where available
14. Confidence intervals
15. Limitations and methodological caveats
16. Readiness conclusions and recommended improvements

Separate observed results from provisional findings and pending evaluations.

### B. Presentation-ready slides

`EXBABEL_UN_TRANSLATION_VALIDATION_SLIDES.pptx`

Use the existing Exbabel presentation files and brand assets if provided.

Create a clean, professional, diplomatic presentation style suitable for institutional stakeholders.

Include:

- Evaluation methodology
- Six-language translation coverage
- Translation quality comparison
- Human-reviewed accuracy
- Terminology and critical-error assessment
- Real-time performance
- Audio comparison examples
- Pilot limitations
- Recommended next phase

Do not claim UN endorsement or certification.

### C. Full machine-readable results

Export:

- `results_raw.jsonl`
- `results_summary.csv`
- `model_capabilities.csv`
- `language_pair_metrics.csv`
- `terminology_results.csv`
- `critical_error_log.csv`
- `latency_results.csv`
- `human_review_packets/`
- `review_adjudications.csv`
- `methodology_and_provenance.json`

Keep timestamps, model versions, hashes, source URLs, and traceability.

### D. Recorded interpretation comparisons

For authorized, shareable samples, generate clearly labeled listening comparisons:

**Original UN speaker → Professional UN interpretation where available → OpenAI → Gemini → Exbabel production if tested**

Record and expose the audio files and their verified provenance.

Do not imply that professional interpreters and AI were operating under identical conditions unless this is actually established.

### E. Remediation backlog

Identify specific problems that can improve Exbabel's system:

- Incorrect terminology
- Model-routing weaknesses
- Audio synchronization
- Source-language detection
- Missing output languages
- Prompt or glossary tuning opportunities
- Translation buffering
- Speech recognition errors
- Inadequate voice stability
- Reliability failures

Prioritize by severity, frequency, and diplomatic consequence.

---

## 12. EXECUTION ORDER

Carry out the assignment in this order.

**Phase 1 — Audit and environment setup**

Inspect folders, source code, SDK versions, API documentation, current test coverage, and dependencies. Install required packages in an isolated environment and execute offline tests.

**Phase 2 — Collect official materials**

Retrieve permitted UN dataset metadata, discover authentic source-language recordings, inspect provenance, and construct the test manifest. Prepare the Parallel Corpus and UNTERM supplemental datasets.

**Phase 3 — Validate model connectivity**

Verify both API credentials and models. Run one short authenticated sample per provider and inspect actual generated audio, captions, event traces, and errors.

**Phase 4 — Execute the feasibility pilot**

Run the frozen initial test set through both systems. If the necessary credentials, verified sources, or media-use permissions are missing, complete everything possible offline and identify the exact remaining prerequisites.

**Phase 5 — Generate blinded references and review packets**

Prepare source transcripts, bilingual reference workflows, randomized model outputs, and human scoring forms. Do not invent human decisions.

**Phase 6 — Calculate verified results**

Compute available metrics, review data completeness, apply human adjudications where available, and calculate confidence intervals.

**Phase 7 — Build the evidence pack**

Produce the report, spreadsheets, reproducibility documentation, audio comparison package, and UN slides.

**Phase 8 — Final technical validation**

Check that each reported result links to actual input material, recorded output, a documented evaluation method, and an audit trail.

Run automated tests and inspect report artifacts.

---

## 13. NON-NEGOTIABLE SCIENTIFIC RULES

- Never fabricate recordings, results, evaluations, or approvals.
- Never call an automatically generated translation a verified human reference.
- Never claim diplomatic-grade certification on the basis of BLEU or COMET alone.
- Never score an unsupported language pair as a valid translation.
- Never silently exclude failed runs.
- Never claim a benchmark is complete when human review is pending.
- Never expose API keys or sensitive information.
- Never change production code without an explicit requirement.
- Never imply that the United Nations has approved, commissioned, endorsed, or participated in the study unless documented.
- Respect all relevant source licensing and media-use restrictions.
- Preserve negative findings.
- Always distinguish a completed test from a proposed test.

## 14. DEFINITION OF SUCCESS

Your job is complete when:

1. The benchmark infrastructure is functional and tested.
2. Official UN material has been gathered and its provenance verified to the extent permitted.
3. OpenAI and Gemini have been tested with real speech wherever credentials and permissions allow.
4. Actual generated audio, transcripts, and timing measurements are preserved.
5. Automated accuracy metrics are computed only when valid references exist.
6. Human evaluation workflows are ready, with real results included only after reviewers complete them.
7. The findings can be independently reproduced and audited.
8. A professional UN-facing evidence package has been generated.
9. Outstanding data, permissions, reviewers, and limitations are explicitly documented.

**Begin by auditing the provided folders and implementation. Then execute the work in sequence. Do not stop after generating another plan.**

At completion, report exactly what was executed, which language pairs and systems were measured, where the output files are saved, what remains pending, and which claims can already be defended with evidence.