gaash.ai

Language Model

A language model is a statistical model of text that assigns probabilities to sequences of words, or tokens, and uses those probabilities to predict what comes next. Everything an AI assistant writes is produced by repeating that prediction, one token at a time.

How the prediction is made

The model is trained on a large body of text and adjusts its parameters until the continuations it rates as likely match the continuations the text actually contains. At use, it is given a sequence, the prompt plus whatever it has already written, and returns a probability for every token in its vocabulary. One token is chosen, appended, and the process runs again. The choice is not always the single most likely token; a setting called temperature controls how much randomness enters, which is why the same question can get two differently worded answers.

Early language models counted how often short runs of words appeared together. Modern ones are neural networks, and the ones behind current assistants are large enough to have their own entry: large language model.

Where the words about your business come from

A model on its own writes from patterns absorbed in training, which has a cutoff date and no index a site owner can inspect. An assistant with retrieval adds a second source: it searches, fetches pages, and places their text in the prompt before predicting, so the answer is conditioned on what those pages say. That second path is the one a business can act on, because the page it serves today is what the model reads today. The mechanism is described under retrieval-augmented generation.

A common question

Why does the same question sometimes get two differently worded answers?

Because the next token is not always the most likely one. The model returns a probability for every token in its vocabulary, one is picked, appended, and the loop runs again; a setting called temperature decides how much randomness enters that pick. Two runs of the same prompt can therefore take different paths through the same probabilities and come out phrased differently, even when the substance is the same.

Related terms

Sources

This entry states mechanism and carries no figures. The site’s method for putting questions to assistants and reading the answers is on the methodology page.