beginner11 min read2 of 24

    How an LLM Actually Works — Tokens, Training Cutoffs and Why It Guesses

    You cannot judge an answer until you understand where it came from. A working mental model of the machine, without the mathematics.

    Rohit Singh

    Mr. Chartist · SEBI RA INH000015297

    Module

    You cannot judge an answer until you have some idea where it came from. Most people using a chat model for market work are judging its output the way they would judge a colleague’s — on tone, on how organised it sounds, on whether it hesitates. Those signals work on people because people generate them honestly. They do not work here, because the machine produces the same tone whether it is right or inventing.

    The good news is that the mental model you need is small and involves no mathematics. Five mechanics explain almost every strange thing a language model will ever do to you: it predicts text rather than retrieving it, it works in tokens, it has a training cutoff, it has a limited context window, and it samples its answers rather than computing one. That is the whole toolkit.

    What makes these worth an hour of your time is that each one maps directly to a failure you will actually meet — a fabricated segment margin, an answer that quietly ignored the last thirty pages you pasted, a confident discussion of a corporate action that happened after the model stopped learning. Learn the mechanic and the failure stops being mysterious. It becomes something you can plan around.

    The one thing to remember

    A language model is completing text, not consulting a database — and every confident wrong answer you will ever get traces back to one of five mechanics you can learn in an afternoon.

    It Is Completing Text, Not Looking Anything Up

    Here is the single most important sentence about how these machines work. When you type a question, the model does not go and find the answer. It generates the text that most plausibly comes next, one small piece at a time, based on patterns learned from an enormous amount of written material. Then it does it again, using everything it has written so far as part of the input. That loop is the entire mechanism.

    It helps to picture it as a very well-read completion engine rather than a librarian. Ask a librarian for a company’s cash flow statement and they either bring the document or tell you the library does not have it. Ask a completion engine and it produces the text that usually follows that request — which, in every document it ever learned from, was a cash flow statement, not an apology.

    This explains the good behaviour as much as the bad. Text-to-text transformation is exactly what a completion engine is built for. Paste an exchange filing and ask for it in five bullets, and the model is doing precisely the job it learned: turning one arrangement of text into another. Nothing is being invented because everything it needs is sitting in front of it.

    It also explains why the machine has no internal difference between remembering and inventing. Both are the same operation — produce the next plausible piece. There is no moment inside the process where the model consults a record and finds it missing. That check simply does not exist, which is why the check has to be yours.

    There is no step inside the machine where it looks something up and finds it absent. Remembering and inventing are the same operation.

    It scores the next piece of text — it does not look anything up

    Every answer is this one step, repeated. A figure appears because a figure is the plausible continuation, not because a record was consulted.

    Text so far
    “Operating margin for the quarter was…”
    Candidate next pieces, ranked by plausibility‹a plausible figure›lowerbroadlynotLonger bar = more plausible. Nothing here measures whether it is true.Draw one, append it to the textthen run the whole step againthe loopNo step that checks a record
    Remembering and inventing are the same operation, so both arrive in the same tone.
    The top-ranked continuation of a question about a figure is a figure —which is exactly what you get whether the number exists or not.
    One step of next-token prediction. The model scores the possible continuations of the text so far, picks one, appends it, and repeats — with no retrieval step anywhere in the loop.

    Tokens — the Unit Everything Is Measured In

    A token is the small chunk of text the model actually works with. It is not a word and not a character — it is somewhere in between. Common words tend to be a single token; unusual words, technical terms and many Indian company names get split into several pieces. Everything you paste is converted into tokens before the model sees any of it, and everything it writes back comes out one token at a time.

    Tokens matter to you for two practical reasons. The first is cost. Where you pay for usage, you pay per token — both for what you send in and what comes back. A three-hundred-page annual report is an enormous number of tokens. Pasting it whole, repeatedly, across a long session is the main reason casual AI research bills surprise people.

    The second reason is truncation, and it is the one that quietly damages your work. Every model has a hard ceiling on how many tokens it can hold. Paste more than that and something gets dropped — often the end of what you sent, sometimes without any warning that it happened. You then ask a question about the final section of a concall, and receive a confident answer built from the parts that survived.

    Numbers deserve a special mention. Figures get split into token pieces in ways that have nothing to do with their arithmetic meaning, which is one reason models are unreliable at calculation even when they are excellent at language. A model can summarise a margin discussion beautifully and then get the subtraction wrong. Treat any arithmetic it performs as a draft to be redone yourself.

    A token is a chunk of text smaller than a word — everything you send and receive is counted in these units.
    Cost scales with tokens in both directions, so re-pasting a long document into every turn is the expensive habit.
    Exceed the model’s ceiling and text is dropped, frequently the tail end of what you pasted, sometimes silently.
    Numbers tokenise in ways unrelated to their value, which is part of why arithmetic is a genuine weak spot.
    If an answer ignores something you know you pasted, suspect truncation before you suspect misunderstanding.

    Pro tip — When you paste anything long, end your prompt with: "Before answering, quote the first line and the last line of the material I pasted." If the last line it quotes is not the last line you sent, the rest was truncated and the answer is built on a fragment.

    The Training Cutoff — Why It Discusses Things It Cannot Know

    Every model was trained on material collected up to a particular date and then frozen. That date is the training cutoff. Beyond it the model has no information at all — not partial information, not stale information, none. It does not know what quarter it is, which way the index has moved, whether a company has announced a buyback, or that a stock has been listed.

    The trap is that it does not experience the cutoff as a boundary. There is no internal calendar and no sense that time has passed since training ended. So when you ask about a recent development, the machine does what it always does: it produces the most plausible continuation. That continuation is a confident, well-structured discussion of an event it has never encountered.

    This produces some of the most convincing wrong answers you will ever read. Ask about a company’s most recent quarterly results and you may get a full paragraph on revenue direction, margin pressure and management commentary — plausible in shape, sourced from nothing. The tell is not in the writing. There is no tell in the writing. The tell is that you asked about something after the cutoff.

    Some products attach a web-search step, which changes the picture but does not remove the problem. Now the model is summarising whatever the search returned, so the quality of the answer is the quality of those pages. If you cannot see which sources were used, you have swapped one unverifiable answer for another. Ask for the links, and read at least the one carrying the number you care about.

    The working rule is simple: anything time-sensitive, you supply. Recent filings, the transcript from the last call, the exchange announcement — paste them in. A model reasoning over material you handed it is a fundamentally more reliable machine than a model recalling a world that stopped at its cutoff.

    The blind spot after the training cutoff

    Everything to the right of the line is unknown to the model — and it has no way of noticing that your question landed there.

    Learned — frozen at the cutoffpatterns from an enormous amount of written materialFilingsTranscriptsArticlesBooksNo information at allnot partial, not stale — noneThis quarterThat filingTodayTRAINING CUTOFFYou ask“What did they announce last quarter?”You get back
    A fluent, fully formed answer. There is no tell in the writing.
    It has no internal calendar
    Nothing inside the model marks the boundary, so a question about the right-hand side is answered the same way as any other. The tell is not in the writing — the tell is that you asked about something after the cutoff. Anything time-sensitive, you supply.
    Everything left of the cutoff was learned; everything right of it is unknown to the model. Because it has no internal calendar, questions about the right-hand side still receive fluent, fully-formed answers.

    Watch out — A model discussing a recent corporate action, index level or quarterly result without you having pasted a source is describing a plausible version of events, not a real one. Supply the document or discard the answer.

    The Context Window — Its Only Working Memory

    The context window is everything the model can hold in view for a single response. Your instructions, the documents you pasted, every earlier turn of the conversation and the answer being written all share that one space. There is no memory outside it. Between one conversation and the next, unless a product deliberately stores something, the model retains nothing whatsoever about you.

    Long research sessions therefore behave in a way that surprises people. You paste a transcript, work through it, move to a second company, ask twelve follow-ups — and eventually the earliest material falls out of view or gets squeezed. The model then contradicts something you both agreed on earlier, not because it changed its mind, but because that exchange is no longer in front of it.

    Even before the window is full, position matters. Material sitting in the middle of a very long context tends to be attended to less reliably than material at the beginning or the end. A number buried thirty pages into a pasted document is more likely to be missed or misread than the same number in a short, focused paste. Bulk is not the same as coverage.

    The habits that follow are unglamorous and they work. One document per thread. Start fresh when you change companies. Keep the important instruction near the end of your prompt, where it is least likely to be diluted. And when a session has run long, re-anchor it deliberately rather than assuming it still remembers.

    Instructions, pasted documents, the whole conversation and the answer all compete for the same limited space.
    Nothing persists between conversations unless the product you are using explicitly saves it.
    Content in the middle of a very long context is attended to less reliably than content at either end.
    A model contradicting an earlier turn has usually lost that turn, not changed its view.
    One document per thread, and a fresh thread per company, costs nothing and removes most of this class of error.
    Re-anchoring a long session
    Stop. Before we continue, answer these three questions using only what is currently in front of you:
    
    1. Which company and which document are we working on? Quote the first line of the material I pasted.
    2. List every figure you have stated so far in this conversation, and next to each one, the sentence from the source it came from.
    3. For any figure where you cannot find the source sentence, move it to a list headed "Unverified - I cannot locate the source for this".
    
    Do not re-derive or re-estimate anything. If it is no longer in front of you, say so.

    When to use — Any time a research session has run past a dozen or so turns, and always before you copy a number out of a chat into your own notes.

    A good answer — It quotes the correct opening line and the source sentences match. If it cannot reproduce the first line of your document, that document has fallen out of the window and everything after that point needs re-checking. A non-empty "Unverified" list is a useful, honest answer — not a failure.

    Sampling — Why the Same Prompt Gives Different Answers

    At every step, the model produces a ranked set of possible next tokens with scores attached. It then picks one. If it always picked the top-scoring option, the output would be repetitive and often flat, so most systems introduce a controlled amount of randomness into that choice. The setting governing how much is usually called temperature.

    Low temperature means the model sticks close to its highest-scoring continuations: more consistent, more predictable, sometimes dull. Higher temperature lets less likely options through: more varied phrasing, more creative structure, and more room for a plausible-but-wrong path to be selected. Most chat products sit somewhere in the middle by default, and many do not let you see or change it.

    The consequence for research is direct. The same prompt asked twice will not produce identical text, and occasionally will not produce identical substance. An answer you liked yesterday may not reproduce today. That is not a malfunction and it is not the model changing its mind — there was never a single answer, only a distribution it drew from.

    This gives you one of the cheapest reliability tests available. Ask the same factual question twice, in two separate fresh threads so neither can see the other. If both runs give you the same figure, that figure at least sits in a stable part of the model’s output. If they disagree, you have learnt something important for the cost of thirty seconds: do not use either number without going to the source.

    The model draws its next token from a scored distribution rather than always taking the top choice.
    Temperature controls how much of that distribution is in play — lower is more repeatable, higher is more varied.
    Two runs of one prompt can differ in wording and, on facts it is unsure about, in substance.
    Running a factual question twice in separate fresh threads is a fast, free consistency check.
    Disagreement between two runs is a genuine warning signal; agreement is reassurance, not proof.

    Why “I Don’t Know” Is Not a Natural Output

    Consider what the training material looks like. It is overwhelmingly made of questions followed by answers — textbooks, articles, documentation, forum threads, reports. Text where somebody asks a clear question and the reply is a flat admission of ignorance is comparatively rare. The pattern the model learned to complete is question-then-answer, and it completes that pattern faithfully.

    Layer on a second point. The model has no separate confidence gauge that it can read off and report to you. Its scores relate to which token plausibly comes next, not to whether the resulting statement corresponds to anything real. So there is nothing to convert into a hedge even in principle. The machine cannot tell you it is unsure because it does not have that quantity.

    What you get instead is uniform fluency. The paragraph containing a correctly recalled figure and the paragraph containing an invented one are written with identical assurance, identical structure, identical willingness to add supporting detail. This is the single most dangerous property of the technology for anyone doing research that will touch a real position.

    You can change the default, and this is the highest-leverage sentence you will ever add to a prompt. Tell the model explicitly that "not stated in the source" is an acceptable and expected answer, that estimation is forbidden, and that gaps must be listed rather than filled. You are not making the model honest — you are changing what the most plausible completion looks like, which is the only lever you have.

    Then verify anyway. Permission to say nothing reduces invention; it does not eliminate it. The instruction is a filter, not a guarantee, and the number that moves money still gets checked against the document it came from.

    A wrong answer and a right answer arrive in exactly the same confident tone. Tone is therefore not a reliability signal, and no amount of experience will make it one.

    Working with a machine that cannot hedge

    Do

    • Write explicit permission into the prompt: "not stated in the source" is a correct answer.
    • Ask for the source sentence beside every extracted figure, so a missing sentence exposes a missing fact.
    • Run important factual questions twice in separate threads and compare.
    • Supply the document rather than relying on recall, for anything time-sensitive.

    Don't

    • Do not read confidence, detail or good structure as evidence that a claim is correct.
    • Do not ask a bare question about a recent event and treat the answer as information.
    • Do not let the model perform arithmetic that matters without redoing it yourself.
    • Do not assume a hedge-free answer means the model checked anything — it has nothing to check against.

    Every Mechanic Maps to a Failure You Will Meet

    The payoff for understanding the machine is that its failures stop being random. Each one has a cause you can name, and once you can name the cause you can build a habit that catches it. The table below is the whole article compressed into a working reference.

    Read the third column carefully, because that is the column you actually experience. You never see truncation; you see an answer that ignored the last section of your document. You never see the cutoff; you see a fluent paragraph about a corporate action that never happened. The visible symptom rarely announces its own cause, which is why the mapping is worth memorising.

    Notice how much of the fourth column is the same small set of moves. Paste the source. Ask for the sentence behind each figure. Keep threads short and single-purpose. Run it twice. Permit "not stated". Five habits cover most of the failure surface, which is a far better ratio than the technology’s reputation suggests.

    None of this makes the tool untrustworthy — it makes it a known quantity. A machine whose failure modes you can list, anticipate and test for is more useful than one you approach with vague optimism. The checklist below is what that looks like in practice.

    MechanicWhat it causesWhat you actually seeWhat you do
    Next-token predictionIt generates rather than retrievesA fluent figure that appears in no sourcePaste the source; demand the sentence behind each number
    TokensLong input is truncated; cost scales with lengthAn answer that ignores the end of your documentSplit the document; make it quote the last line received
    Training cutoffNo knowledge of anything recentConfident discussion of an event it never sawAsk for the cutoff; supply recent material yourself
    Context windowEarlier turns fall out of viewIt contradicts something settled ten turns agoOne document per thread; re-anchor before trusting
    SamplingAnswers are drawn, not computedTwo runs return two different figuresAsk twice in fresh threads; treat disagreement as a stop
    No refusal instinctGaps get filled instead of reportedA clean answer where the source was silentExplicitly permit "not stated in the source"
    Mechanic, failure, symptom, countermeasure

    Reading an answer with the mechanics in mind

    Six checks, none of which takes more than a few seconds. Run them before anything from a chat window enters your own research notes.

    • Did I supply the source, or is this the model’s recollection of a document?
    • Does every figure come with the sentence it was taken from?
    • Is any part of this about a period after the model’s training cutoff?
    • Did it confirm the last line of what I pasted, so I know nothing was truncated?
    • Has this thread run long enough that early material may have dropped out of view?
    • For the one number that actually matters — have I opened the primary document and looked at it?

    Common questions

    Because it is completing text rather than retrieving records. A confident figure with the right format is the most plausible continuation of a question about a figure, so that is what gets produced. There is no internal step where it checks whether the number exists, which is why invention and recall come out identical.

    Knowledge Check

    Question 1 of 3Score: 0

    You paste a very long concall transcript and ask about a point management made near the end. The answer never touches it. What is the most likely cause?

    Rohit Singh — Mr. Chartist

    Written By

    Rohit Singh

    Mr. Chartist

    With 14+ years of experience in Indian financial markets, Rohit Singh (Mr. Chartist) is a SEBI Registered Research Analyst, Amazon #1 bestselling author, and the founder of Investology — a premium trading ecosystem trusted by a 1.5 Lakh+ strong community across India.

    INH000015297Full Bio

    Keep reading