AIToday
Large Language ModelsQiita 機械学習Published: Nov 29, 2026, 19:01 JST

Qiita guide: LLMs just predict the next token, context decides

Send on LINE
Qiita guide: LLMs just predict the next token, context decides

3 Key Points

  1. What happened

    A Qiita beginner's guide explains that an LLM repeatedly predicts the next likely token and adds it, and that context — system prompt, past turns, the question, attachments — is all the model sees.

  2. Why it matters

    The guide argues this explains why earlier instructions can seem forgotten or answers drift, and recommends stating key conditions explicitly, not carrying too much history, and splitting long documents.

Ask AI

Ask the AI about this article. Questions and answers are published on this page

Context & Analysis

The guide builds its explanation around two ideas that connect many practical complaints. Because text is split into tokens — often words or word fragments in English and one to a few characters in Japanese — token counts, not character counts, drive both pricing and the length a model can process. Because the model only sees the context supplied at that moment, conditions changed mid-conversation can linger, while conditions at the start of a long document can fade.

It also draws a line between parameters, the weights adjusted during training, and training data, whose cutoff fixes how fresh the model's knowledge is. From these points it derives practical habits: put important conditions explicitly in context, avoid hoarding old instructions that compete with new ones, and summarize or split long material rather than passing everything.

A checklist ties symptoms to causes and fixes: instructions not reflected point to conflicting conditions, answers cut off point to the output token limit, wrong recent information points to the training cutoff, and varying answers point to probabilistic generation. The guide closes by recommending prompt design, embeddings, and RAG as the next learning steps, citing OpenAI, Anthropic, and Google AI documentation.

FAQ
Why do charges and length limits depend on tokens?
The guide says token counts, not character counts, determine pricing and the maximum length a model can handle.
Why does an LLM sometimes produce a confident-sounding wrong answer?
Its goal is to produce a natural continuation, not to guarantee correctness, so grammatically clean errors can appear — the backdrop to hallucination, the guide says.
Why does the same question get different answers?
Because generation is probabilistic, the guide recommends checking important uses multiple times.
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? →

Related Articles

Next articlellama-cpp-rdna-boosts optimizes llama.cpp for AMD RDNA 3/4 GPUs