LLM
A large language model (LLM) is a neural network trained on large amounts of data to work with language. It can answer questions, summarize documents, and generate text or code.
Also known as: большая языковая модель, Large Language Model
What is an LLM?
A large language model is a general-purpose language model that can take different instructions without being retrained for each task. Give it a support ticket and it can label the issue; give it a meeting transcript and it can list action items. “Large” refers to the scale of the model and its training, not to an official parameter cutoff. The model is also not the whole chatbot: the application may store chat history, search documents, or call tools on the model's behalf.
From training data to an answer
A tokenizer turns text into tokens, which may be whole words, pieces of words, or even punctuation. During pretraining, many generative LLMs learn to predict the next token from earlier tokens. Training adjusts the model's weights, the numerical parameters that govern its predictions. A later training stage can make the model better at following instructions. Most modern generative LLMs use the Transformer architecture, whose attention mechanism lets the model weigh information from different positions in the sequence.
When you send a prompt, the model assigns probabilities to possible next tokens. A decoding rule picks one, the system appends it, and the model predicts again using the updated sequence. Generation stops when it reaches a stop condition, such as an end token or an output limit. This process is called inference. Supplying a prompt changes what the model sees, not its weights.
Example: answering questions about a policy
Suppose a customer asks whether a purchase is still eligible for a refund. A model given only the question might confidently offer a generic 30-day deadline, even if the store's policy says otherwise. With retrieval-augmented generation (RAG), the application first looks up the current policy and puts the relevant passage in the prompt. If the passage states a 14-day window but the order date is missing, a good answer explains the rule and asks for the date rather than guessing whether the customer qualifies.
Common mistakes
- Treating fluency as evidence. A plausible but false or unsupported claim is often called a hallucination. For consequential answers, check the claim against a reliable source.
- Assuming the model remembers every message. A context window limits how many tokens the model can work with at once. The application decides which past messages, if any, to include.
- Using fine-tuning to keep facts current. Fine-tuning changes the model's weights and can help it learn a recurring task or response style. For facts that change frequently, retrieving current records is usually easier to maintain and verify.
What interviewers look for
For an ML or backend role, you may be asked how to tell whether a document assistant is ready to ship. Test retrieval and generation separately: did the system find the right passage, and does that passage support the answer? Include questions the documents cannot answer, then measure latency and cost alongside answer quality.