In the previous lesson, you learned how large language models (LLMs) generate text by predicting one token at a time and how the context you provide in your prompt shapes the model's response. In this lesson, we will focus on understanding model versions. This knowledge will help you make better choices when working with different models and crafting your prompts.
You probably already noticed that LLM's answer can differ each time you send a prompt.
This is because LLMs are probabilistic—they generate responses by predicting the most likely next word or token, but there's always some randomness involved. This means you can't be sure the model will always return exactly what you want. Sometimes, the answer can be very different with each run of a request, even if you use the same prompt.
This is important to remember during the practices: since we can't know exactly what the LLM will return, you may get an unexpected answer. If that happens, you can try rerunning the prompt in another chat to see if you get a better result, or you can refine your prompt to guide the model more clearly.
LLMs are updated and improved over time. Each update is called a model version
. New versions are released for several reasons:
- To include more recent information in the training data.
- To fix mistakes or improve how the model understands prompts.
- To make the model faster or more accurate.
For example, you might see models named Claude Sonnet 3.7
and Claude Sonnet 4
. The higher number usually means a newer version, often with more up-to-date information and better performance.
In our environment, you have access to four models:
- Amazon Nova Premier
- Claude Sonnet 4
- DeepSeek R1
- Llama 4
Each of these models has its own strengths and may respond differently to questions, particularly those involving recent events or specific instructions. For example, if you ask for today's date, each model might answer in its own way, depending on its internal guidelines and the data it was trained on. Some models will provide the most recent date they are aware of as "today's date," while others may explicitly state that they do not know the current date because their training data is limited and they lack internet access.
Note: Modern language models are typically designed to be cautious when addressing questions outside their knowledge base. If asked about something they have no information on, they often respond honestly with "I don't know." However, it's important to remember that a model's primary function is to generate plausible answers, not necessarily correct ones. As a result, they may sometimes produce inaccurate or misleading information. This is called "LLM hallucination".
While LLMs can be very helpful assistants, they should not be relied upon as definitive sources of truth.
In this lesson, you learned:
- What model versions are and why they matter.
- Which LLMs are available in our environment and how they might differ.
- How different models can give different answers to the same question, especially about dates and recent events.
Next, you'll get to practice by sending these questions to different models and comparing their answers. This will help you see firsthand how model versions affect your experience as a prompt engineer.
