AIToday
Large Language ModelsQiita 機械学習Published: Nov 18, 2026, 10:01 JST

BM25 test: BPE vs 形態素解析 splits search scores

Send on LINE
BM25 test: BPE vs 形態素解析 splits search scores

3 Key Points

  1. What happened

    In the author's BM25 test, the query "形態素解析" scored 2.2391 on an unrelated document under BPE but 0.0000 under morphological analysis, which split the term cleanly.

  2. Why it matters

    The 2.2391 score on an unrelated document shows BPE's partial matching can surface noise, while the 0.0000 score shows morphological analysis avoids that noise for this query.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

By signing up you agree to the Terms of Service and Privacy Policy.

Context & Analysis

A personal experiment compared how LLMs and search systems split text. It starts from the observation that LLMs use BPE, which merges frequent character pairs, while search engines typically use morphological analysis, which relies on a dictionary. The author then runs a BM25 keyword search with both tokenization methods on three query patterns. The results show a trade-off: BPE handles unknown words and spacing variations flexibly, but it can produce partial matches that inflate scores for unrelated documents. Morphological analysis avoids such noise when words are in its dictionary, but it can miss variants like 'Llama Index' with a space. The author concludes that using BPE tokens for search can lead to lower precision and larger indexes, which matters for RAG pipelines that feed retrieved text to an LLM.

FAQ
What is BPE?
BPE (Byte Pair Encoding) is a tokenization method that merges frequently co-occurring character pairs, used by LLMs such as GPT, Claude, and Llama.
Why not use BPE tokens for search?
BPE splits words into subword pieces that can match unrelated documents, as the BM25 test showed with partial matches on '形', '態', and '素'.
What is morphological analysis?
Morphological analysis divides text into meaningful words based on a dictionary and grammar, using tools like MeCab or Janome.
Qiita 機械学習Read Original Article
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleLangChain launches LangSmith Sandboxes with microVM isolation