10 minutes of reading
Key takeaways
- ChatGPT produces each response token by token by predicting the most likely continuation from the request, instructions and context still present.
- The context window limits what ChatGPT can reread, and useful information placed at the beginning or end of the context often yields better results than information placed in the middle.
- Long conversations increase the cost because each new response reuses the context that is still available and adds new tokens.
- For answer engine optimization, tracking citations by identifiable source makes it possible to measure which page is used, for which question and in which response.
In this article
- How does ChatGPT actually work?
- Why does ChatGPT split the text of your question into tokens?
- How is the text of a response built word by word?
- What happens to your conversation in the context window?
- Why do you pay more for the longer conversations?
- Why can the content of a convincing response be false?
- Why do the sources that are cited matter for answer engine optimization?
- How can you integrate ChatGPT, a language model, into your working practices?
How does ChatGPT actually work?
It is token by token that ChatGPT produces the response. It predicts the most likely continuation from your question and the text still present in the exchange. It calculates probabilities for different phrasings, then chooses the continuation based on the words already received, the instructions and the requested tone. It does not understand your situation as a human conversation partner would. It does not automatically consult the real world. A fluent response is not proof: it can repeat an error, miss a recent fact or invent a credible detail.
Why does ChatGPT split the text of your question into tokens?
ChatGPT splits your question into tokens because its calculations operate on numerical units of the text. Each unit corresponds to a fragment of text, not an entire idea. A token can correspond to a word, part of a word, a punctuation mark or a space, depending on the writing received. The model converts these units into numbers to calculate the probabilities of possible token sequences.
The word “référencement” can be treated differently from a short expression or a proper name. The segmentation depends on the exact form of the characters that are present. A typo, an internal abbreviation or very compact wording therefore does not disappear into the general intention of the request. It reaches the calculation in a form that is segmented. This granularity allows the model to work on the text, character by character or fragment by fragment. It has no direct access to what your company means by the words used.
As part of a practical method for integrating artificial intelligence into your working practices, write out the important names, references and constraints. Do not leave them implicit. The result also depends on the textual material that is provided at the outset for it.
“It predicts the most likely continuation from your question and the text still present in the exchange.”
Do you want to turn this question into a useful decision for your business?
A 30-minute conversation allows us to examine the context, what needs checking and the next step.
How is the text of a response built word by word?
With each added token, ChatGPT reassesses the most plausible continuation from all the tokens still present in the context. It does not fill in the blanks of a sentence planned in advance. After “your”, it chooses “response”. That choice then joins the question, the instructions received, the requested tone, the phrasing that has begun and the text already produced. It changes the probabilities of the next token, then the choices that follow until the final punctuation mark. It is therefore a word, a space or a period that shifts the calculation. A detail in the request can change the wording of a later passage. The words generated before it also remain part of the calculation. Replacing “brief” with “precise” can influence the next word or have an effect after several tokens, when the available options have already changed.
What happens to your conversation in the context window?
The context window is the limited portion of your conversation that ChatGPT can reread when responding. It contains your recent request, the instructions still present and the document excerpts added. When the exchange exceeds its capacity, the oldest passages cease to influence the response directly. An instruction given at the beginning can therefore fall outside the scope of what is read without warning.
The position of information in that context also matters. According to Liu et al. (2024), on multi-document question-answering and key-value retrieval tasks, models often achieve their best results when the useful information is at the beginning or end of the context, with a marked decline when it is in the middle, including for long-context models. A long history therefore does not guarantee that an essential instruction will receive the same weight as a recent item. For a practical method, put the rule, fact or excerpt that should guide the response back at the start of the exchange before requesting the deliverable.
This discipline matters when the integration of artificial intelligence into working practices relies on long exchanges, reports or successive documents. Keep a short version of the instructions that are decisive. Put it back in the conversation that you are having. You thus make visible what the model still needs to reread, instead of assuming that it retains the entire history.
Why do you pay more for the longer conversations?
Long conversations cost more because each new response reuses the context that is still available to it. Your new request and the text it produces are added to that context. An instruction written twenty messages earlier can therefore continue to enter the calculation as long as it remains in the context window, even if nobody rereads it on screen. A cache can reduce the price or delay when passages that are identical are reused. It does not make the rest of the exchange free, nor the new tokens generated.
The useful decision is to separate short tasks from cases that actually require a long context. According to Li et al. (2024), long-context models often outperform RAG when resources are sufficient, but at a significantly higher cost; automatic routing between retrieval and long context maintains comparable quality while reducing the average cost. In a practical method, keep only the documents that are useful for the expected response. Then open a new exchange when the case that you are working on changes. The budget thus follows the material that is actually necessary for it.
Why can the content of a convincing response be false?
A convincing response can be false because fluent wording does not guarantee that it has any verifiable grounding in a source. A confident tone, a precise detail or a logical sequence does not suffice to establish that a fact is accurate. The problem also affects checking: in FELM: Benchmarking Factuality Evaluation of Large Language Models, Chen et al. (2023) collected 847 responses and 4 427 annotated segments across five domains; the best evaluator tested, GPT-4, achieves an F1 score of 48.3 and 67.1 % balanced accuracy for distinguishing factual segments from erroneous segments.
- Identify each of the factual claims that can guide a decision.
- Ask for the precise source that allows you to check it.
- Discard or rephrase the content that you cannot verify.
This practical method keeps you from treating a sentence that is well written as proof. It matters when the integration of artificial intelligence into working practices involves a price, a rule, a result or a decision for which an error is costly.
Why do the sources that are cited matter for answer engine optimization?
The cited sources matter because they connect a generated response to evidence that anyone can verify.
For answer engine optimization, this separation makes the measurement of AI citations possible. It allows you to record which page is used, for which question and in which response, without confusing the engine’s wording with the document that supports it. Traditional search engine optimization measures the position of a page within the list of links that is returned. Answer engine optimization checks whether a source appears in the text of a response that is written. A practical method therefore tracks citations by identifiable source, then checks the content to which they point.
How can you integrate ChatGPT, a language model, into your working practices?
Integrating ChatGPT well means assigning it the work for which the speed gain helps. Then require human review and sources whenever an error can affect a decision, a client or the content of a publication. The corpus RAGTruth: A Hallucination Corpus for Developing Trustworthy Retrieval-Augmented Language Models, presented by Niu et al. (2024), brings together nearly 18 000 responses produced by different models with retrieval-augmented generation, manually annotated at both the individual case and word levels to measure hallucinations.
The scope therefore depends on the cost of an error that occurs. A first draft, a rephrasing or the classification of internal information can accelerate work that is still reviewed by the person responsible for it. However, a claim intended for a prospect, a figure included in a decision or a page published for answer engine optimization must remain linked to a document that can be verified. Li et al. (2024) report that long-context models often outperform RAG when resources are sufficient, but at a significantly higher cost, while automatic routing between retrieval and long context maintains comparable quality while reducing the average cost.
Adopt a simple practical method: before each request, decide whether the result can serve as a draft or requires verification by the person who knows the case. When verification is required, you should ask for the sources. Open them and check that each supports the sentence selected. For AI citation measurement, retain the question tested, the response obtained and the page cited. Visible presence is not enough. You need to know which evidence the engine uses.
Frequently asked questions
What should you do when your exchange becomes very long?
Prepare a short version of the instructions and essential information, then put it back in your current message. Do not assume that the beginning of the conversation remains available or receives the same attention as a recent item.
How should you write the names and constraints in your request?
A request that contains the important names, references and constraints gives the model specific textual material. The model works on the fragments of text received, without knowing the intention that your company attaches to those words.
When should you open the next exchange?
A new exchange is appropriate when the case changes and the previous documents are no longer useful for the expected response. This separation retains the necessary context and keeps the budget from following material that is no longer useful.
What should you do with a claim that has no verifiable source?
A factual claim that has no precise source must be discarded or rephrased before it guides a decision. This check distinguishes a sentence that is well written from evidence, especially if the error can be costly.
What should you record to measure an AI citation?
For each question, record the page used and the response in which it appears. This measurement distinguishes the engine’s wording from the document that supports it, so that the content to which the citation points can be checked.
Start with a simple conversation
For 30 minutes, we examine your situation, what needs checking and the next useful decision.
For professionals only · you will receive a response within one business day
Sources
- This verified source has the title “Lost in the Middle: How Language Models Use Long Contexts” and it is used in this article.
- This verified source has the title “RAGTruth: A Hallucination Corpus for Developing Trustworthy Retrieval-Augmented Language Models” and it is used in this article.
- This verified source has the title “FELM: Benchmarking Factuality Evaluation of Large Language Models” and it is used in this article.
- This verified source has the title “Retrieval Augmented Generation or Long-Context LLMs? A Comprehensive Study and Hybrid Approach” and it is used in this article.
