Repository navigation
v7.16.2: Déjà Vu no longer counts Chinese function words and fragments - #29
Merged
Merged
Conversation
…WIP) Fixed-boundary bigrams turned every Chinese sentence into half function words and cross-word fragments (我们 / 的那 / 过的 / 得我), so unrelated Chinese questions were familiar. Skip bigrams containing particles, 我/你/们, 这/那, 是, 在, plus a list of common words, time deixis and recall-frame words. Benchmarks and docs follow in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ZZeQFn5F6mEbmX8vPsf4g
- whole 3-4 character runs are skipped when every adjacent pair is common (我们的, 哈哈哈哈); 为什 added to the word list - benchmarks/dejavu_chinese_real.py (LCCC chit-chat, 10 unrelated questions): 20 utterances 6/10 -> 0/10 familiar, 200: 10/10 -> 1/10, 2000: 10/10 -> 3/10; Chinese section E unchanged (3/4 rescued, 0/3 noise) - full Deja Vu benchmark re-run and doc tables re-rendered; latency is lower because of the machine (same-machine A/B of the tokenizers is within 10%), stated in the docs - bump to 7.16.2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ZZeQFn5F6mEbmX8vPsf4g
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Chinese is cut into fixed-boundary two-character pieces. Half of the pieces in a sentence are function words or fragments that cross a word boundary. For example, "我们聊过的那家川菜馆" gave 我们 / 们聊 / 聊过 / 过的 / 的那 / 那家 / 家川 / 川菜 / 菜馆, and only the last three are about the restaurant.
On real Chinese chit-chat (LCCC), after only 20 remembered messages, 6 of 10 unrelated questions came back "familiar". The evidence was 一下, 什么, 我说, 的那, 过的…
Change
A Chinese piece no longer counts if either of these holds:
A short run (3–4 characters) whose every adjacent pair is common gives nothing, e.g. 我们的 or 哈哈哈哈.
他 / 她 are deliberately not on the character list, so 吉他 and 其他 survive; 他们 / 他说 are on the word list instead. The tests also lock in that 成都, 过敏, 那不勒斯 and 吉他 still come through.
No migration is needed, same as v7.16.1.
Measured
benchmarks/dejavu_chinese_real.py(new; LCCC, MIT, Weibo chit-chat, 10 unrelated questions):Other results:
dejavu_bench.py(Chinese "familiar but unsearchable") is unchanged: 3/4 misses rescued, 0/3 noise. Section E2 (English) is also unchanged.Not fixed
Validation
examples/dejavu_minimal.pyruns; the README and doc examples match the real output.Generated by Claude Code