← Pack index Download .zip Back to the article

Four models, one Arabic RTL docs page

Measured 2026-11-29 on a Mac Studio (Apple M3 Ultra, 96GB), macOS 15.7.4. One prompt, three runs per model, one request at a time.

The four models built the same single-file Arabic documentation page for a fictional NLT API: RTL, five sections, search, dark mode, nav, tables, code blocks, responsive at 390px and 1440px, no external assets.

Headline results

Model Runtime Median wall Output tokens Functional checks Inline bidi
Claude Haiku 5.5 Anthropic Messages API 18.1s 4,573 18/18 ×3 4/4
Gemma 4 31B Ollama 0.40.16 46.8s 2,874 18/18 ×3 0/3
Qwen3.8 27B Ollama 0.40.16 2:27 12,919 17/18, 18/18, 18/18 0/6
Inkling 2 Mini Ollama 0.40.18 2:34 6,739 18/18 ×3 0/4

215 of 216 functional checks passed. The only miss is Qwen run 1, which overflowed a 390px viewport (451px). Runs 2 and 3 passed. The inline-bidi audit is separate from the 18 checks; it is explained below.

Findings

The bidi tell

All four pages set <html lang="ar" dir="rtl">. All four made their block code LTR. The difference is inline code inside Arabic prose and table cells.

In an RTL paragraph, the string /analyze can render as analyze/ because the slash has no strong direction and the inline code inherits the paragraph direction. The fix is one rule:

code, .path {
  direction: ltr;
  unicode-bidi: isolate;
}

The audit finds every <code> whose text is a single path such as /analyze, then compares the x-position of the slash and the next character. If the slash is to the right of the next character, the visual order is wrong.

This is a targeted bidi read, not a full RTL audit. It was added after looking at the four pages; it is reported separately from the pre-registered 18 checks.

Method

Item Value
Prompt prompt.md
Runs 3 per model, 12 pages total
Decoding temperature 0, 24,576 output cap, 32,768 context
Local thinking off for all three local models
Claude thinking disabled
Local state warm; cold load was 3.9 to 4.3 s and is excluded from the timed runs
Selection run 1 is the published representative; all runs are in the pack

Models:

Model Local ID Runtime
Qwen3.8 27B qwen3.8:27b-mlx Ollama 0.40.16, NVFP4
Gemma 4 31B gemma4:31b-mlx Ollama 0.40.16, NVFP4
Inkling 2 Mini inkling-local-chat Ollama 0.40.18, isolated store, renderer inkling2
Claude Haiku 5.5 claude-haiku-5-5 Anthropic Messages API

The 18 checks, per page:

  1. doctype
  2. lang="ar"
  3. dir="rtl"
  4. Arabic prose ratio and minimum length
  5. nav links to #overview, #quickstart, #auth, #endpoints, #errors
  6. search keeps the auth section and hides at least one non-match
  7. zzzz shows لا توجد نتائج and hides all five sections
  8. clearing restores all five sections
  9. dark toggle changes the visible colors
  10. light contrast ≥ 4.5:1
  11. dark contrast ≥ 4.5:1
  12. at least two LTR block code areas with curl and Authorization
  13. no page-level horizontal overflow at 390px
  14. no page-level horizontal overflow at 1440px
  15. no external requests or external asset tags
  16. no console or page errors (favicon 404 ignored)
  17. footer contains 2026 and NLT API
  18. single-file isolation, no external stylesheet/script/image

The bidi audit is check 19 in spirit, but it is not one of the 18.

Costs

Reproduction

export ANTHROPIC_API_KEY=...
python3 run_bakeoff.py
python3 score_all.py
node bidi_audit.cjs

The local models must exist in Ollama. run_bakeoff.py reads the Anthropic key from the environment or NLT_ENV_FILE. score_all.py expects Playwright and NODE_PATH pointing at a node_modules with it. The exact prompt is prompt.md.

File map

Licenses

Caveats

The Wikipedia-derived text and its translations are CC BY-SA 4.0. FLORES-200 is CC BY-SA 4.0. COMET-22 is Apache 2.0; the COMET-Kiwi int8 build is CC BY-NC-SA 4.0. The pack does not contain the paid API key.