LangMatch
Can Classical Chinese (Wényán) serve as a natural-language compression prompt for LLMs? A controlled study of the quality–cost tradeoff. Visit project site · View on GitHub
Exploratory · May 2026 · reported like a short paper, but too small to publish — findings are preliminary, not a formal result.

1 · Background
LLM inference cost scales with context length: longer prompts mean more tokens, higher latency, and more context pressure. Prompt-compression research shows that shrinking the input while preserving behaviour is a real efficiency lever. A second line of work shows tokenizers are not language-fair — the same meaning costs a different number of tokens in different languages — and cross-lingual prompting shows the prompt language changes not just token count but the model's behaviour, reasoning path, and format compliance.
Classical Chinese is exceptionally dense: heavy ellipsis, high information density, terse grammar. That makes it an intuitive candidate for a “natural-language compression prompt.” But the intuition does not settle two things: (1) is Wényán actually cheaper under the tokenizer, and (2) if it is, does task success survive?
2 · Objective & research questions
The key comparison is not “which language is shorter,” but: under fixed tasks and fixed model backends, does a more compressed prompt language produce a better quality–cost frontier? Only the language of the system prompt changes; the task is held constant.
- RQ1 — Under semantic equivalence, does a Wényán system prompt reliably reduce input tokens?
- RQ2 — Does any token saving come at the cost of success rate / instruction-following / accuracy?
- RQ3 — Do differences come mainly from tokenizer segmentation, or from style-induced behaviour change?
- RQ4 — Does the effect reproduce across model families (open vs. closed)?
3 · Related work
- Ancient-Chinese LLMs (C3Bench, TongGu, Fuxi, WenyanGPT) treat Classical Chinese as a first-class, separately-modelled language — but focus on understanding / generation, not token efficiency.
- Cross-lingual prompting shows the prompt language shifts model behaviour, reasoning, and format compliance — not just surface tokens.
- Token tax / tokenizer fairness shows the same information costs differently across languages — language itself is a cost variable.
- Prompt compression (LLMLingua, Selective Context) proves shrinking prompts is valuable — but via algorithmic compression, not by exploiting a language's own expressive density.
These four lines have never been combined into one testable question: can Classical Chinese act as a natural-language compression prompt? LangMatch is that controlled test — it does not train a new Wényán model, it evaluates Wényán as a system-prompt language under strict variable control.
4 · Experiment design
Three functionally-equivalent system-prompt modes — same task, same models, same output budget; only the prompt language changes:
base — compact English
You are a helpful assistant. Follow the user's instructions carefully. Except for code and direct quotations, keep explanations and narration concise. Avoid colloquial filler. Eliminate redundancy and aim for compact, clear expression.
zh_compact — Modern Chinese
你是一个有帮助的助手。请严格遵循用户要求。除代码和直接指令外,所有解释与叙述都尽量写得简洁。禁止口语化赘述,删繁就简,要求表达精炼、意思清楚。
wy — Classical Chinese (Wényán)
汝为善应人问之助手,当谨循其命。凡码与引文外,释理叙事宜从简。禁绝白话冗词,务求辞约义明。
- Models: gpt-4o, gpt-5.4, qwen3-1.7b, qwen3-4b — API and local (Transformers) backends under one pipeline
- Benchmarks: IFEval (instruction-following), MATH-500 (text-only subset, final-answer accuracy), MMLU-Pro
- Metrics: prompt / completion / total tokens; benchmark Score or SR; and Score per 1k tokens as the efficiency axis
- Budget & auditing: a unified 2048-token output budget with per-run token accounting; the runner records
configured_max_tokens,finish_reason, and usage, so truncation is detected rather than silently scored
Manifest (fixed task subsets) → run all task × prompt-mode × model combinations → raw results.jsonl + per-run summaries → cross-run aggregation into matrix reports → Pareto frontier plots (score vs. total tokens)
Rigor note. An early pilot used tight caps (IFEval 192, MATH-500 64, MMLU-Pro 8) and produced truncation artifacts — most sharply, gpt-5.4 / IFEval returned empty visible output while still consuming the full completion budget, making the model look weak. The main matrix was rerun at 2048, which cleared the artifacts for gpt-4o, gpt-5.4, and qwen3-4b (0 cap-hits); qwen3-1.7b retains 4 cap-hits (finish_reason=length) and is read cautiously. All numbers below are the corrected 2048 rerun.
A follow-up 3-run study holds the language fixed (base / zh / wy) and instead varies the interaction setting — explicit_process (visible reasoning), hidden (think but don't show), compact_visible (brief visible reasoning) — to separate the effect of prompt language from that of reasoning visibility.
5 · Results
5.1 Main matrix (2048-token budget)
Overall, aggregated across benchmarks (each point one model × prompt-mode combination):
| Model | Prompt | N | Score | Prompt Tok | Completion Tok | Total Tok | Score/1k |
|---|---|---|---|---|---|---|---|
| gpt-4o | base | 59 | 0.593 | 182.93 | 37.12 | 220.05 | 2.696 |
| gpt-4o | zh_compact | 59 | 0.627 | 200.93 | 29.59 | 230.53 | 2.720 |
| gpt-4o | wy | 59 | 0.576 | 187.93 | 32.86 | 220.80 | 2.610 |
| gpt-5.4 | base | 59 | 0.729 | 181.93 | 54.64 | 236.58 | 3.081 |
| gpt-5.4 | zh_compact | 59 | 0.746 | 199.93 | 49.05 | 248.98 | 2.995 |
| gpt-5.4 | wy | 59 | 0.763 | 186.93 | 45.15 | 232.08 | 3.286 |
| qwen3-1.7b | base | 59 | 0.339 | 197.85 | 127.00 | 324.85 | 1.044 |
| qwen3-1.7b | zh_compact | 59 | 0.271 | 203.85 | 125.20 | 329.05 | 0.824 |
| qwen3-1.7b | wy | 59 | 0.254 | 197.85 | 228.12 | 425.97 | 0.597 |
| qwen3-4b | base | 59 | 0.441 | 197.85 | 121.95 | 319.80 | 1.378 |
| qwen3-4b | zh_compact | 59 | 0.475 | 203.85 | 69.98 | 273.83 | 1.733 |
| qwen3-4b | wy | 59 | 0.475 | 197.85 | 98.71 | 296.56 | 1.600 |
gpt-5.4 is the strongest model overall, and its earlier weak IFEval showing was confirmed to be a truncation artifact, not a real deficit. zh_compact is the most stable prompt family (best for gpt-4o, ties best for qwen3-4b); wy is a conditional gain — the single strongest overall mode on gpt-5.4.
Pareto-style score vs. total tokens, per benchmark (click any figure for full size):
IFEval
After removing the cap artifact, gpt-5.4 reaches 1.000 SR under all three modes; qwen3-4b also saturates. On this benchmark high-capacity models satisfy the task under multiple prompt languages.
| Model | Prompt | N | Score | Prompt Tok | Completion Tok | Total Tok | Score/1k |
|---|---|---|---|---|---|---|---|
| gpt-4o | base | 11 | 0.909 | 92.45 | 182.36 | 274.82 | 3.308 |
| gpt-4o | zh_compact | 11 | 0.909 | 110.45 | 141.82 | 252.27 | 3.604 |
| gpt-4o | wy | 11 | 0.818 | 97.45 | 161.45 | 258.91 | 3.160 |
| gpt-5.4 | base | 11 | 1.000 | 91.45 | 269.36 | 360.82 | 2.771 |
| gpt-5.4 | zh_compact | 11 | 1.000 | 109.45 | 239.09 | 348.55 | 2.869 |
| gpt-5.4 | wy | 11 | 1.000 | 96.45 | 218.18 | 314.64 | 3.178 |
| qwen3-1.7b | base | 11 | 0.909 | 101.00 | 314.55 | 415.55 | 2.188 |
| qwen3-1.7b | zh_compact | 11 | 0.909 | 107.00 | 319.91 | 426.91 | 2.129 |
| qwen3-1.7b | wy | 11 | 1.000 | 101.00 | 391.45 | 492.45 | 2.031 |
| qwen3-4b | base | 11 | 1.000 | 101.00 | 177.82 | 278.82 | 3.587 |
| qwen3-4b | zh_compact | 11 | 1.000 | 107.00 | 129.64 | 236.64 | 4.226 |
| qwen3-4b | wy | 11 | 1.000 | 101.00 | 151.73 | 252.73 | 3.957 |
MATH-500
The headline split: zh_compact is best for gpt-4o, while wy is best for gpt-5.4 — Wényán becomes a real quality–cost contender on capable models and concise reasoning tasks. qwen3-4b's best score is under wy, while zh_compact stays slightly cheaper.
| Model | Prompt | N | Score | Prompt Tok | Completion Tok | Total Tok | Score/1k |
|---|---|---|---|---|---|---|---|
| gpt-4o | base | 24 | 0.542 | 146.79 | 5.29 | 152.08 | 3.562 |
| gpt-4o | zh_compact | 24 | 0.708 | 164.79 | 5.46 | 170.25 | 4.161 |
| gpt-4o | wy | 24 | 0.583 | 151.79 | 4.71 | 156.50 | 3.727 |
| gpt-5.4 | base | 24 | 0.625 | 145.79 | 5.88 | 151.67 | 4.121 |
| gpt-5.4 | zh_compact | 24 | 0.667 | 163.79 | 6.00 | 169.79 | 3.926 |
| gpt-5.4 | wy | 24 | 0.708 | 150.79 | 6.00 | 156.79 | 4.518 |
| qwen3-1.7b | base | 24 | 0.208 | 158.21 | 78.12 | 236.33 | 0.882 |
| qwen3-1.7b | zh_compact | 24 | 0.083 | 164.21 | 23.54 | 187.75 | 0.444 |
| qwen3-1.7b | wy | 24 | 0.000 | 158.21 | 120.92 | 279.12 | 0.000 |
| qwen3-4b | base | 24 | 0.250 | 158.21 | 155.62 | 313.83 | 0.797 |
| qwen3-4b | zh_compact | 24 | 0.250 | 164.21 | 108.46 | 272.67 | 0.917 |
| qwen3-4b | wy | 24 | 0.292 | 158.21 | 165.50 | 323.71 | 0.901 |
MMLU-Pro
The most conservative benchmark: it does not reward Wényán as clearly. Once truncation is removed, gpt-5.4 is uniformly strong across modes; gpt-4o still prefers base, qwen3-4b still prefers zh_compact — a model-task interaction that survived the rerun.
| Model | Prompt | N | Score | Prompt Tok | Completion Tok | Total Tok | Score/1k |
|---|---|---|---|---|---|---|---|
| gpt-4o | base | 24 | 0.500 | 260.54 | 2.38 | 262.92 | 1.902 |
| gpt-4o | zh_compact | 24 | 0.417 | 278.54 | 2.29 | 280.83 | 1.484 |
| gpt-4o | wy | 24 | 0.458 | 265.54 | 2.08 | 267.62 | 1.713 |
| gpt-5.4 | base | 24 | 0.708 | 259.54 | 5.00 | 264.54 | 2.678 |
| gpt-5.4 | zh_compact | 24 | 0.708 | 277.54 | 5.00 | 282.54 | 2.507 |
| gpt-5.4 | wy | 24 | 0.708 | 264.54 | 5.00 | 269.54 | 2.628 |
| qwen3-1.7b | base | 24 | 0.208 | 281.88 | 89.92 | 371.79 | 0.560 |
| qwen3-1.7b | zh_compact | 24 | 0.167 | 287.88 | 137.62 | 425.50 | 0.392 |
| qwen3-1.7b | wy | 24 | 0.167 | 281.88 | 260.46 | 542.33 | 0.307 |
| qwen3-4b | base | 24 | 0.375 | 281.88 | 62.67 | 344.54 | 1.088 |
| qwen3-4b | zh_compact | 24 | 0.458 | 287.88 | 4.17 | 292.04 | 1.569 |
| qwen3-4b | wy | 24 | 0.417 | 281.88 | 7.62 | 289.50 | 1.439 |
5.2 LangMatch 3-run (interaction settings)
Language fixed; interaction setting varied. Overall SR vs. tokens under explicit, hidden, and compact-visible reasoning (IFEval panels are missing-data placeholders in this export, not negative results):
explicit_process
| Model | Setting | N | SR | Prompt Tok | Completion Tok | Total Tok |
|---|---|---|---|---|---|---|
| gpt-4o | base | 48 | 0.688 | 205.67 | 488.21 | 693.88 |
| gpt-4o | wy | 48 | 0.708 | 241.58 | 342.77 | 584.35 |
| gpt-4o | zh | 48 | 0.688 | 232.52 | 543.54 | 776.06 |
| gpt-5.4 | base | 48 | 0.646 | 204.67 | 180.90 | 385.56 |
| gpt-5.4 | wy | 48 | 0.833 | 240.58 | 337.83 | 578.42 |
| gpt-5.4 | zh | 48 | 0.667 | 231.52 | 206.10 | 437.62 |
| qwen3-4b | base | 48 | 0.583 | 215.54 | 1180.71 | 1396.25 |
| qwen3-4b | wy | 48 | 0.396 | 232.06 | 1014.48 | 1246.54 |
| qwen3-4b | zh | 48 | 0.646 | 216.90 | 1149.19 | 1366.08 |
hidden
| Model | Setting | N | SR | Prompt Tok | Completion Tok | Total Tok |
|---|---|---|---|---|---|---|
| gpt-4o | base | 48 | 0.562 | 207.17 | 8.38 | 215.54 |
| gpt-4o | wy | 48 | 0.438 | 240.38 | 21.83 | 262.21 |
| gpt-4o | zh | 48 | 0.479 | 229.29 | 8.44 | 237.73 |
| gpt-5.4 | base | 48 | 0.625 | 206.17 | 11.02 | 217.19 |
| gpt-5.4 | wy | 48 | 0.604 | 239.38 | 11.29 | 250.67 |
| gpt-5.4 | zh | 48 | 0.604 | 228.29 | 18.60 | 246.90 |
| qwen3-4b | base | 48 | 0.667 | 217.04 | 1017.15 | 1234.19 |
| qwen3-4b | wy | 48 | 0.438 | 229.38 | 899.08 | 1128.46 |
| qwen3-4b | zh | 48 | 0.646 | 214.21 | 1002.83 | 1217.04 |
compact_visible
| Model | Setting | N | SR | Prompt Tok | Completion Tok | Total Tok |
|---|---|---|---|---|---|---|
| gpt-4o | base | 48 | 0.667 | 225.67 | 151.27 | 376.94 |
| gpt-4o | wy | 48 | 0.646 | 268.42 | 135.17 | 403.58 |
| gpt-4o | zh | 48 | 0.688 | 252.12 | 164.65 | 416.77 |
| gpt-5.4 | base | 48 | 0.583 | 224.67 | 12.35 | 237.02 |
| gpt-5.4 | wy | 48 | 0.833 | 267.42 | 114.50 | 381.92 |
| gpt-5.4 | zh | 48 | 0.562 | 251.12 | 16.90 | 268.02 |
| qwen3-4b | base | 48 | 0.708 | 235.54 | 842.60 | 1078.15 |
| qwen3-4b | wy | 48 | 0.479 | 254.08 | 824.71 | 1078.79 |
| qwen3-4b | zh | 48 | 0.667 | 236.00 | 713.25 | 949.25 |
gpt-5.4 + wy is the standout under both explicit_process and compact_visible (SR 0.833); hidden mainly reduces cost rather than raising scores; qwen3-4b shows no stable Wényán advantage.
Full result reports:
6 · Takeaways
- Prompt-language effects are real, but strongly model- and task-dependent.
zh_compactis the most robust default across closed and open families.wyis a serious candidate on strong models — its gains on gpt-5.4 survive the corrected rerun, and it is best on gpt-5.4 / MATH-500 — but it is not universal.- In the 3-run view, reasoning visibility matters alongside language;
hiddenis a cost-reduction setting, not a score-maximizing one.
Working conclusion: Classical Chinese functions as a conditional prompt-compression strategy, not a universal one — worth switching on per model, not by default.
7 · Rigor & limitations
- The 2048 rerun cleared truncation artifacts for gpt-4o, gpt-5.4, and qwen3-4b;
qwen3-1.7bstill has 4 cap-hits and is interpreted cautiously. - Token counts come from source-native backends (openai for GPT logs, transformers for qwen logs) — read them within-model, not as tokenizer-identical across providers.
- Prompt modes are functionally close but not perfectly translation-aligned; a style-vs-density confound is mitigated by including the Modern-Chinese compact control (
zh_compact), not fully eliminated.
Early-stage — findings are preliminary observations, not a formal result.





