---
title: 'Qwen3.8 Can''t Follow an Arabic Glossary: 3 Fixes'
description: Qwen3.8 followed 26.7% of a 12-term Arabic glossary zero-shot. A glossary prompt raised it to 46.7%, few-shot to 50%, repair to 56.7%. Here is the cost.
url: https://nerdleveltech.com/qwen3-8-arabic-glossary-fixes
language: en
date: '2026-11-29'
updated: '2026-11-29'
category: ai-ml
tags:
  - Qwen3.8
  - Arabic translation
  - prompt engineering
  - glossary
  - local LLMs
  - benchmarking
  - cost analysis
markdown_url: https://nerdleveltech.com/qwen3-8-arabic-glossary-fixes.md
attribution: 'Source: NerdLevelTech — https://nerdleveltech.com/qwen3-8-arabic-glossary-fixes'
terms: https://nerdleveltech.com/llms.txt
---

# Qwen3.8 Can't Follow an Arabic Glossary: 3 Fixes

Qwen3.8-27B followed **26.7%** of a 12-term Arabic glossary with no glossary in the prompt. Adding the glossary raised that to **46.7%**. Two few-shot examples added 3.3 points, which is not statistically significant. A checker-driven repair pass reached **56.7%**, but it used **70% more requests** and its COMET score moved in the wrong direction.

The cheap fix is the prompt. The expensive fix is not obviously worth it.

This is the same 20-paragraph Arabic test used in [the 30B benchmark](https://nerdleveltech.com/hy-mt3-qwen3-8-haiku-arabic-translation-benchmark) and [the 1.8B follow-up](https://nerdleveltech.com/hy-mt3-1-8b-arabic-translation-test), with the same 12-term glossary and three runs per arm. The question is narrow: if a general model keeps missing your terminology, what actually fixes it?

## TL;DR

- **The glossary prompt is the best fix.** Strict glossary rose from **26.7%** to **46.7%** (20.0 points; paired per-segment +19.5, p = 0.006). COMET-Kiwi moved +0.0071 (p = 0.221), so the prompt did not cost measurable raw quality.
- **Few-shot is not worth the extra prompt.** It raised the rate to **50.0%**, only 3.3 points over the glossary prompt (paired +2.5, p = 0.718). COMET moved -0.0026 (p = 0.320).
- **The repair pass adds points and cost.** It reached **56.7%** (10.0 points over the glossary prompt; paired +6.7, p = 0.081). It rewrote **42 of 60** outputs, used **102 requests**, and raised median latency from 2.46 s to 3.72 s. COMET moved -0.0184 (p = 0.197).
- **Code and placeholders were never the problem here.** Code spans, placeholders and URLs pass 100% in every arm. The strict checker is about terminology, not markup.
- **The checker can be gamed.** A naive repair prompt produced `الوكيل الذكاء الاصطناعي`, which satisfies the term check but is not grammatical. The grammar-aware prompt produced `وكيل الذكاء الاصطناعي`. Read the output, not just the score.
- **The hierarchy is unchanged.** On the same corpus: 30B 86.7%, 1.8B Q4 70.0%, 1.8B Q8 60.0%, Haiku 50.0%, Qwen after repair 56.7%. Qwen's raw COMET is high; its glossary discipline is the weak point.
- The four arms, 240 raw outputs, exact prompts and scores are in the [pack index](https://nerdleveltech.com/benchmarks/qwen3-8-arabic-glossary-fixes/index.html) ([zip](https://nerdleveltech.com/benchmarks/qwen3-8-arabic-glossary-fixes/qwen3-8-arabic-glossary-fixes-pack.zip)).

## What I tested

| Item | Value |
|---|---|
| Model | `qwen3.8:27b-mlx` in Ollama 0.40.16, NVFP4, 27.8B, 262,144-token context |
| Host | Mac Studio, Apple M3 Ultra, 96GB, macOS 15.7.4 |
| Date | 2026-11-29 |
| Corpus | 20 paragraphs, 1,432 English words, same as the 30B and 1.8B tests |
| Glossary | 12 terms, same list as the 30B test |
| Runs | 3 per paragraph per arm = 60 outputs per arm |
| Decoding | temperature 0, `think: false`, 8,192 context, 2,048 max tokens |
| Arms | zero-shot, glossary prompt, glossary + few-shot, glossary + repair |
| Gloss baseline | Reused the Qwen outputs from the 30B test (same prompt, model and settings) |
| Repair | The model is called only when the strict checker finds a missing term |

The prompts are in the pack. The model is a dense vision-language build with a 262,144-token context[^qwen], and the corpus comes from the Wikipedia article on AI agents[^wiki]. The few-shot examples are two short sentences translated by Hy-MT3-30B[^hy30], not by Qwen, so the examples are not Qwen grading itself.

## Results: the prompt does most of the work

| Arm | Glossary strict | COMET-Kiwi |
|---|---:|---:|
| Zero-shot | 26.7% | 0.7923 |
| Glossary prompt | **46.7%** | **0.7994** |
| Glossary + few-shot | 50.0% | 0.7968 |
| Glossary + repair | **56.7%** | 0.7810 |

Requests and median latency: zero-shot 60 / 2.34 s, glossary 60 / 2.46 s, few-shot 60 / 2.35 s, repair 102 / 3.72 s. COMET-Kiwi[^comet] is reference-free, so it scores the Arabic without a reference translation.

![Chart of Qwen3.8 Arabic glossary results across four arms. Glossary strict rates are 26.7% zero-shot, 46.7% with the glossary prompt, 50.0% with few-shot and 56.7% with the repair pass. COMET-Kiwi scores are 0.7923, 0.7994, 0.7968 and 0.7810.](https://nerdleveltech.com/images/qwen3-8-arabic-glossary-fixes.png)

## Fix 1: the glossary prompt

The zero-shot arm is the control. It gets the same translation instruction and the same guard about names, numbers and code, but no glossary. Qwen still renders "AI agent" its own way, and 39 of 90 required terms are missed. The result is unconstrained rather than wrong.

The glossary prompt adds the 12 lines:

```text
Reference the following translations:
AI agent translates to وكيل ذكاء اصطناعي
agentic AI translates to ذكاء اصطناعي وكيلي
large language model translates to نموذج لغوي كبير
...
```

That single block raises strict glossary from 26.7% to 46.7%. The paired per-segment gain is 19.5 points (p = 0.006). COMET-Kiwi moves +0.0071 (p = 0.221), so there is no evidence of a fluency cost. This is the fix to ship.

The miss profile is consistent. "AI agent" is the biggest miss in every arm: 39 misses zero-shot, 39 with the glossary, 36 with few-shot, 30 after repair. Qwen often writes `الوكيل الذكي` or `وكيل ذكي` instead of the glossary's **وكيل ذكاء اصطناعي**. The glossary prompt reduces the variant, but it does not eliminate it.

## Fix 2: few-shot

Two examples cost 60 extra prompt tokens per request. They raise the strict rate by 3.3 points overall, from 46.7% to 50.0%. The paired per-segment difference is 2.5 points (p = 0.718), and COMET moves -0.0026 (p = 0.320).

That is not a result I would build a pipeline around. The examples are useful for showing the terms in context, but Qwen already has the 12-line glossary. A third and fourth example might help, but the marginal return is small and the prompt grows on every request. If you want few-shot, measure it on your own glossary; do not assume it beats the plain glossary prompt.

## Fix 3: the repair pass

The repair arm takes the glossary output and checks it. If every required term is present, the draft is kept. If a term is missing, Qwen gets a second prompt with the source, the draft, the glossary and a grammar note. It rewrites the paragraph.

The result is real but expensive:

- Strict glossary: 46.7% to 56.7% (10.0 points overall; paired +6.7, p = 0.081).
- Repairs: 42 of 60 outputs.
- Requests: 102 for 60 outputs, 70% more.
- Median latency: 2.46 s to 3.72 s.
- COMET-Kiwi: 0.7994 to 0.7810 (paired -0.0184, p = 0.197).
- Exact digits: 95.0% to 90.0%.
- Length check: 100% to 95.0%.

The point estimate on COMET is negative. With 20 paragraphs it is not statistically significant. There is also no evidence that the repair improves raw quality; it improves the checker's terminology count.

The grammar note matters. A simpler repair prompt produced:

> الوكيل الذكاء الاصطناعي هو برنامج ذكاء اصطناعي...

That string contains the glossary term, so the strict checker passes it. It is also ungrammatical. The grammar-aware prompt produced:

> وكيل الذكاء الاصطناعي هو برنامج ذكاء اصطناعي...

If you use a repair pass, the checker is not enough. You need a grammar check or a human read.

## Production checks

- **Code spans, placeholders and URLs:** 100% in all four arms.
- **Exact digits:** zero-shot 90.0%, glossary 95.0%, few-shot 95.0%, repair 90.0%.
- **Latin names kept:** zero-shot 50.0%, glossary 45.0%, few-shot 45.0%, repair 45.0%.

Code and placeholders were never the failure mode for Qwen. The Latin-name row is a brand-script choice, not a translation error: Qwen transliterates more names than the 30B. The "all hard checks" number is 50.0% / 45.0% / 45.0% / 40.0%, but that number is dominated by the name-style check. Do not read it as "half the translations are broken." Read the individual rows.

![Terminal capture of the Qwen3.8 Arabic glossary summary: zero-shot 26.7%, glossary prompt 46.7%, few-shot 50.0%, repair 56.7%, with COMET, request counts and latency.](https://nerdleveltech.com/images/qwen3-8-arabic-glossary-terminal.png)

## Where this leaves Qwen

| Model | Glossary | COMET-Kiwi |
|---|---:|---:|
| Hy-MT3 30B Q8 | **86.7%** | 0.7888 |
| Hy-MT3 1.8B Q4 | 70.0% | 0.7457 |
| Hy-MT3 1.8B Q8 | 60.0% | 0.7617 |
| Qwen + repair | 56.7% | 0.7810 |
| Haiku 5.5 | 50.0% | **0.8032** |
| Qwen + glossary | 46.7% | 0.7994 |
| Qwen zero-shot | 26.7% | 0.7923 |

Glossary is the strict checker. COMET-Kiwi is the paragraph score. The 30B is still the glossary specialist. The 1.8B Q8 beats Qwen after repair with one call, 60.0% to 56.7%. Haiku 5.5[^haiku] is 50.0%. Qwen's COMET is high, but COMET does not enforce your terminology.

The practical read:

- **If you already use Qwen:** add the glossary prompt. It is one prompt edit, 20 points, no measurable quality cost. Do not bother with few-shot unless your own test says otherwise.
- **If the glossary is critical:** use Hy-MT3-30B, or the 1.8B if memory is tight. The repair pass does not close the gap to the 30B.
- **If you need a repair pass:** budget 70% more calls, check the grammar, and measure COMET. A checker-only pass can produce grammatical nonsense.

## FAQ

### Is the glossary prompt enough?

For many pipelines, yes. It raises strict glossary from 26.7% to 46.7% and does not hurt COMET. It is not enough for a glossary-critical product: the 30B is still 40 points ahead.

### Why did few-shot not help more?

Two examples add context, but Qwen already has the 12-line glossary. The gain is 3.3 points overall and is not statistically significant (p = 0.718). The prompt grows on every request for a marginal return.

### Does the repair pass hurt quality?

The point estimate is negative: COMET 0.7994 to 0.7810 (paired -0.0184, p = 0.197). At 20 paragraphs the difference is not statistically significant. There is also no evidence of improvement. It reduces exact-digit and length pass rates. Read the repaired text.

### Can the repair pass cheat the checker?

Yes. A naive prompt produced `الوكيل الذكاء الاصطناعي`, which contains the term but is ungrammatical. The grammar-aware prompt produced `وكيل الذكاء الاصطناعي`. The checker measures term presence, not grammar.

### Can I use the same prompt with Hy-MT3?

The 30B and 1.8B tests use the same glossary prompt format. Hy-MT3 is a translation specialist, so it already follows the terms better. The 30B reaches 86.7% without a repair pass.

### What does this cost?

The local API bill is $0. The repair pass costs requests and latency: 102 calls for 60 outputs, median 3.72 s instead of 2.46 s. There is no per-token API fee on this machine.

### Can I reproduce it?

Yes. The [pack index](https://nerdleveltech.com/benchmarks/qwen3-8-arabic-glossary-fixes/index.html) has the four prompts, 240 raw outputs, per-output scores and the repair flags. The [30B pack](https://nerdleveltech.com/benchmarks/hy-mt3-arabic-translation/index.html) and [1.8B pack](https://nerdleveltech.com/benchmarks/hy-mt3-1.8b-arabic-translation/index.html) have the comparison rows.

## Limitations

- **No human evaluation.** COMET-Kiwi and the strict checker are automatic. The grammar example is a concrete failure, but a native editor would catch more.
- **One article.** The paragraph test uses a single Wikipedia article on AI agents. It is rich in terminology, but it is not a legal contract or a marketing landing page.
- **MSA only.** The glossary and references are Modern Standard Arabic. Do not generalize to Egyptian, Gulf or Levantine dialects.
- **One prompt design.** The glossary prompt is not the only possible prompt. A different wording, ordering or example set could do better or worse.
- **The repair arm is a pipeline, not a model result.** It uses the glossary draft plus a second call. Compare it to the other arms as a pipeline.

## Related reads

- [Hy-MT3 vs Qwen3.8 vs Haiku 5.5: Arabic Translation Test](https://nerdleveltech.com/hy-mt3-qwen3-8-haiku-arabic-translation-benchmark)
- [Hy-MT3 1.8B: Small Arabic Translation Model Test](https://nerdleveltech.com/hy-mt3-1-8b-arabic-translation-test)
- [Running LLMs Locally: The Complete Practitioner's Guide](https://nerdleveltech.com/running-llms-locally-the-complete-2025-guide)
- [Ollama Setup Guide: Run Local LLMs Like a Pro](https://nerdleveltech.com/ollama-setup-guide-run-local-llms-like-a-pro-2026-edition)

[^qwen]: Qwen, "Qwen3.8-27B-FP8" model card: 27B dense vision-language model, 262,144-token context, Apache 2.0. https://huggingface.co/Qwen/Qwen3.8-27B-FP8
[^wiki]: Wikipedia, "AI agent," revision 1387610875, 2026-11-24. CC BY-SA 4.0. https://en.wikipedia.org/wiki/AI_agent
[^comet]: Unbabel, "wmt22-cometkiwi-da" reference-free quality estimation. https://huggingface.co/Unbabel/wmt22-cometkiwi-da
[^hy30]: Tencent, "Hy-MT3-30B-A3B-GGUF" model card: 30B total / 3B active, 102 languages, Apache 2.0. https://huggingface.co/tencent/Hy-MT3-30B-A3B-GGUF
[^haiku]: Anthropic, "Pricing," Claude Haiku 5.5: $0.10 input / $0.50 output per million tokens up to 100K-token prompts. https://platform.claude.com/docs/en/about-claude/pricing
