TriAgent → Multilingual semantic cache

A cache that crosses languages

Key your LLM cache on a multilingual sentence embedding instead of a string, and a new market inherits the answers you already computed for the old one: 95% of Chinese queries hit the English cache at F1 0.99.

CIKM 2026 arXiv:2607.19794 Code

What the Shared Consensus Dictionary stores

The Shared Consensus Dictionary (SCD) is a semantic cache with two properties that distinguish it from a conventional LLM cache.

First, it caches committee decisions rather than single-model outputs — the adjudicated answer, which is more accurate than any individual member's. Second, its key is a multilingual sentence embedding (paraphrase-multilingual-MiniLM-L12-v2, 384 dimensions), which turns the cache into a cross-lingual canonicaliser.

A query is embedded to φ(x), k-NN searched against cached entries by cosine similarity, and served the cached label when the best match σ* exceeds a threshold τ.

The cross-lingual result

Chinese-translated Financial PhraseBank queries matched against an English-only cache:

τCross-lingual hit rateAccuracy vs. goldF1 vs. gold
0.50100.0%0.9870.983
0.6099.2%0.9880.983
0.7094.5%0.9900.987
0.7586.9%0.9920.990
0.8075.3%0.9970.996
0.8554.9%1.0001.000

At τ = 0.70 nearly every Chinese query finds an English entry that means the same thing, and the label it inherits is right 99% of the time. The Chinese committee never runs.

Plot of cross-lingual cache hit rate and F1 against similarity threshold tau. Hit rate falls from 100% at tau 0.5 to 55% at tau 0.85, while F1 rises from 0.983 to 1.000. The two curves cross in a broad region around tau 0.70 where hit rate is still 95% and F1 is already 0.99.
Hit rate against label quality as the similarity threshold moves. The useful property is how flat the F1 curve is: even at τ = 0.50, where the cache answers every single query, labels are still right 98% of the time. The operating point at 0.70 gives up almost nothing on either axis.

The monolingual trade-off

Within a single language the threshold trades coverage against accuracy in the usual way. On Financial PhraseBank, 3,386 build / 1,452 query split:

τHit rateF1 loss vs. always-committee
0.953%−0.3 pp
0.8510%−0.8 pp
0.5083%−14.5 pp

Scaling the cache from 4,838 to 16,769 sentences preserves the shape of this curve, which suggests the trade-off is a property of the method rather than of the particular corpus.

Trade-off curve of cache hit rate against macro-F1 as the similarity threshold sweeps from 0.95 down to 0.50. The curve is flat and near-lossless from 3% to about 30% hit rate, then bends downward sharply beyond 50% hit rate.
Cache coverage against accuracy. The curve is nearly flat up to roughly 30% coverage, then bends. The knee is where the operating point belongs.

Against GPTCache

GPTCacheShared Consensus Dictionary
What is storedsingle-model outputcommittee decision
Keymonolingual sentence embeddingmultilingual sentence embedding
Serves a new languageno — populate per languageyes — inherits from any language already cached

A caution: the architecture should change with the language

The cache crosses languages cleanly. The model hierarchy does not.

LanguageSpecialistSpecialist F1Qwen-7B F1Winner
EnglishFinBERT0.880.81specialist
Mandarinfinbert-tone-chinese0.720.80LLM

The ranking inverts. Where no strong domain specialist exists for a language, the LLM is the specialist and the router should escalate from reasoner to encoder rather than the reverse. Optimal committee architecture is language-specific even when the cache is not.

A sharper version of the same point: on FinChinaSentiment (5,738 genuine Chinese sentences), English VADER and English FinBERT both score F1 = 0.06 — essentially random, because they do not process Chinese at all. Cross-lingual transfer is a property of the multilingual embedding, not of the monolingual models sitting behind it.

Why cross-lingual transfer is nearly lossless here

Running the full multi-size sweep on 1,500 translated sentences: Qwen-7B reaches F1 0.80 in Chinese against 0.81 in English, a 1-point drop. Qwen-1.5B actually does slightly better in Chinese (0.72) than English (0.69). The 3B anomaly — where 3B underperforms 1.5B by over-predicting the neutral class — persists in both languages, which suggests it is a property of that checkpoint rather than of the language.

Related