Loading

Quipoin Menu

Learn • Practice • Grow

/
interview

Q1. How do LLMs like GPT understand the text you give them?
LLMs are trained on massive amounts of text using a neural network architecture called the Transformer.
They learn patterns, relationships, and probabilities between words and sentences.
When you input a prompt, the model breaks it into smaller pieces called tokens (words or sub‑words).
It then processes the sequence through many layers, predicting the most likely next token based on the context of all previous tokens.
The model does not understand meaning in a human sense, but it statistically predicts coherent and relevant continuations.

Q2. What is the role of the prompt in the model's generation process?
The prompt serves as the initial context or conditioning for the model.
It sets the starting state of the generation.
The model then continues the sequence token by token, each time using all previous tokens (including the prompt) to decide what comes next.
If the prompt contains instructions, the model learns to follow them because similar patterns appeared in its training data.
Thus, the prompt directs the model's behavior without changing its internal weights.

Q3. Why do LLMs sometimes ignore parts of the prompt or produce incorrect answers?
There are several reasons:
• The prompt may be too long – models have a context window limit (e.g., 4k, 8k, 128k tokens). Important instructions near the start can be forgotten (lost in the middle phenomenon).
• The instruction may be ambiguous or contradictory.
• The model may lack the specific knowledge (especially for recent events or niche topics).
• The model is probabilistic; even with a perfect prompt, it can sometimes make errors.
• The model’s training data may contain conflicting examples, causing confusion.
Iterative testing and refining the prompt usually helps.

Q4. What is the "lost in the middle" problem?
Research has shown that LLMs tend to pay most attention to the beginning and the end of a long prompt.
Information placed in the middle is more likely to be ignored or forgotten.
This is called the "lost in the middle" problem.
To mitigate this, place the most critical instructions either at the very start or very end of the prompt.
For example, put the task description first and the output format last, while keeping intermediate context less crucial.

Q5. How do system prompts differ from user prompts in chat models?
In chat-based LLMs (like ChatGPT), there are typically three roles: system, user, and assistant.
System prompt: sets the overall behavior and rules for the assistant. It is not visible to the end-user in normal interactions. Example: "You are a helpful coding assistant that never gives executable code."
User prompt: the actual query or instruction from the user.
Assistant: the model's response.
System prompts are powerful for setting persistent guidelines across multiple turns, while user prompts are for specific requests.