መሰረታዊ መመሪያ

Why LLMs Struggle to Count Letters

Large language models struggle to count letters because they do not read text one character at a time.

  • 4 ደቂቃ አንብብ
  • ለመጨረሻ ጊዜ የዘመነው
በዚህ ገጽ ላይ4 ደቂቃ አንብብ
  1. አጠቃላይ እይታ
  2. ጥልቅ ዳይቭ
  3. ስልታዊ ተጽእኖ
  4. The Future of Why LLMs Struggle to Count Letters
  5. የእውነተኛ-ዓለም አተገባበር
  6. አደጋዎች እና የጥበቃ መንገዶች
  7. የትግበራ ፍኖተ ካርታ
  8. ማሰስዎን ይቀጥሉ
  9. በተደጋጋሚ የሚጠየቁ ጥያቄዎች

አጠቃላይ እይታ

They read tokens, which are chunks of characters, so the individual letters inside a word are often never directly visible to the model. This one fact explains a whole family of odd mistakes with spelling, counting, reversing and rhyming, and it tells you how to work around them.

ጥልቅ ዳይቭ

Before a language model sees any text, a tokenizer splits it into tokens. Most modern tokenizers use a method such as byte pair encoding, which learns common character sequences from a large body of text. Frequent words often become a single token, and rarer words are split into a few pieces. The model then receives each token as a number and turns it into a vector. It never receives the letters inside that token as separate inputs. So when you ask how many r's are in 'strawberry', the model is not scanning ten characters. It sees perhaps two or three chunks, and it has to recall, from patterns learned during training, which letters those chunks contain. That knowledge exists but it is indirect and fuzzy, like being asked how many times the letter e appears in a word you have only ever seen as a picture. The strawberry question became a widely shared example in 2024 precisely because the answer is obvious to people and surprisingly hard for chatbots. The same cause produces related errors: misspelling when asked to spell out loud, reversing words wrongly, failing letter-based constraints like acrostics or lipograms, and miscounting characters for length limits. Exact splits differ between tokenizers, so one model may get a given word right while another fails. A common misconception is that this shows models cannot reason or are simply careless. The limit is mostly in the input format, not in general reasoning. When a model is prompted to spell the word out first, each letter tends to become its own token, and counting becomes a far easier task. Newer reasoning models often do this spelling step on their own, which is one reason they get these questions right more often. For anything where exactness matters, running a short piece of code is still the most reliable method.

ስልታዊ ተጽእኖ

ግልጽ ውሳኔዎች

ግልጽ ቴክኒካዊ የይገባኛል ጥያቄዎችን ከገበያ ቋንቋ እንዲለዩ ያግዝዎታል።

ወጪ እና በጀት

ገንዘብን ወይም ጊዜን ከማጥፋትዎ በፊት የተሻሉ የትግበራ ጥያቄዎችን መጠየቅ ይችላሉ።

ቡድን እና የስራ ፍሰት

የጋራ ግንዛቤ ያላቸው ቡድኖች የተሻለ ምርት፣ ፖሊሲ እና የመማር ውሳኔዎችን ያደርጋሉ።

The Future of Why LLMs Struggle to Count Letters

Researchers are exploring models that work directly on bytes or characters, and hybrid designs that group bytes dynamically, which could make character-level tasks more natural. These approaches have tradeoffs, because longer input sequences cost more compute. Meanwhile, reasoning models that spell words out step by step and models that call code tools already reduce many of these errors in practice. It is reasonable to expect fewer embarrassing letter-counting failures over time, but for tasks that need exact character counts, using code rather than trusting a model's recall will likely remain good practice.

የእውነተኛ-ዓለም አተገባበር

Asked how many times the letter r appears in 'strawberry', a chatbot answers two instead of three, because the word reaches the model as a few multi-letter chunks rather than ten separate letters.

A teacher asks a model to write a sentence where every word starts with the letter s, and it slips in words that do not, since it has to infer each word's first letter instead of seeing it.

A developer asks for the word 'encyclopedia' spelled backwards and gets a version with swapped or missing letters; asking the model to first list the letters one per line, then reverse the list, fixes it.

A puzzle app needs exact letter counts for a word game, so it computes them with a single line of ordinary code and uses the model only to write the hints.

አደጋዎች እና የጥበቃ መንገዶች

  • የተለያዩ ቡድኖች ተመሳሳይ ቃል በተለያየ መንገድ ሊጠቀሙ ይችላሉ፣ ስለዚህ ወሰንን ቀደም ብለው ይግለጹ።

  • የገሃዱ ዓለም አፈጻጸም ያልተስተካከለ ሆኖ ሳለ ማመሳከሪያዎች ጠንካራ ሊመስሉ ይችላሉ።

  • የውሂብ ጥራት እና የግምገማ እቅዶችን ችላ ማለት ብዙውን ጊዜ ደካማ ውጤቶችን ይፈጥራል.

የትግበራ ፍኖተ ካርታ

  1. የሚፈልጉትን ውጤት በግልፅ ቋንቋ ትርጉም ይጀምሩ።

  2. ከመሞከርዎ በፊት አንድ የስኬት መለኪያ እና አንድ የውድቀት ሁኔታ ይምረጡ።

  3. አንድ ትንሽ አብራሪ በተወካይ ውሂብ ያሂዱ እንጂ የተጣራ ማሳያ ስብስብ አይደለም።

  4. Document where Why LLMs Struggle to Count Letters helps and where simpler methods are better.

ማሰስዎን ይቀጥሉ

Free newsletter

Get the daily AI briefing

Three verified AI stories every weekday morning, written in plain English. Free forever, no ads.

One email each weekday. Unsubscribe in one click. We never sell or share your address.

Test yourself

Take the Why LLMs Struggle to Count Letters quiz

Instant feedback on every answer, and a shareable certificate with a verifiable ID once you pass a course.

ጥያቄ ጀምር

Support free AI education. AI Understanding is a 501(c)(3) nonprofit — no ads, no paywall, ever. Make a donation

በተደጋጋሚ የሚጠየቁ ጥያቄዎች

What is Why LLMs Struggle to Count Letters?

Large language models struggle to count letters because they do not read text one character at a time. They read tokens, which are chunks of characters, so the individual letters inside a word are often never directly visible to the model. This one fact explains a whole family of odd mistakes with spelling, counting, reversing and rhyming, and it tells you how to work around them.

What is the main reason language models miscount letters in a word?

Models receive tokens, which often contain several characters. The letters inside a token are not separate inputs, so the model must recall them indirectly.

What does a tokenizer produce from a piece of text?

The tokenizer splits text into pieces from a fixed vocabulary and maps each to an integer ID, which is then turned into a vector.

Which prompt change most helps a model count letters correctly?

Writing the word with separators like s-t-r-a-w usually puts each letter in its own token, which makes counting a much easier task.

Byte pair encoding builds its vocabulary by doing what?

BPE starts from bytes or characters and keeps merging the most frequent adjacent pair, so common strings become single tokens.

Why might 'Strawberry' and ' strawberry' be handled differently by a model?

Tokenizers often include leading spaces and case in tokens, so small surface changes can produce different token splits.