From the course: Foundations of AI and Machine Learning for Java Developers
Unlock this course with a free trial
Join today to access over 24,500 courses taught by industry experts.
Importance of context - Java Tutorial
From the course: Foundations of AI and Machine Learning for Java Developers
Importance of context
- [Instructor] We've learned that the way to get a useful completion from a language model is by sending an initial prompt string to get it started. And the better we craft our prompts, that is our prompt engineering, the better our completion. One very important aspect of creating good prompts is the notion of context. Context is additional information that further guides the language model to generate a more relevant completion. Context is critically important in a prompt. Now how do we add this context to the prompt? Context is just a set of strings, and as Java developers, we all know how to handle strings. So all we have to do is add these strings to our prompt and send that along to the language model. Now, to illustrate how important context is, let's examine some basic techniques in prompt engineering. One technique is called zero-shot. Zero-shot means we give the language model no context, examples, or additional guidance. We are relying on the foundational training of the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.