Example RAG Prompt for the 2028 Olympics Question
In Retrieval-Augmented Generation, retrieved texts are used as additional context to prompt a Large Language Model, enabling it to generate a response based on that specific information. A complete RAG prompt typically includes instructions, the user's question, and the retrieved texts. For instance, to find the location of the 2028 Olympics, the LLM could be given the following prompt: 'Your task is to answer the following question. To help you with this, relevant texts are provided. Please base your answer on these texts. Please note that your answers need to be as accurate as possible and faithful to the facts. If the information provided is insufficient for an accurate response, you may simply output "No answer!". Where will the 2028 Olympics be held? The information regarding this question is given as follows:' This structure clearly separates the task instructions from the context the model should use.
0
1
Tags
Ch.3 Prompting - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Using a Search Engine for Text Retrieval
Example of Retrieved Text for the 2028 Olympics Question
Historical Context of Los Angeles as a Three-Time Olympics Host
Timeline of Recent Olympic Games in the United States
Example of Retrieved Text for the 2024 Olympics
Example RAG Prompt for the 2028 Olympics Question
Example of LLM Refusal with Irrelevant Context
Example of a Hybrid Prompt Combining RAG and Tool Use
A user asks a language model the following question: 'Where will the 2028 Olympics be held?' To generate an accurate answer, the model is provided with an external text snippet. Which of the following text snippets would be most effective for the model to use in its response?
Evaluating Information Sufficiency for an Answering System
An automated answering system is tasked with answering a user's question based only on a provided text.
User's Question: 'Where will the 2028 Olympics be held?'
Provided Text: 'The 2028 Summer Olympics, also known as Los Angeles 2028, is a forthcoming international multi-sport event. It is scheduled to be held in the United States from July 14 to July 30, 2028. This will be the first time the Olympic Games have been hosted in the United States since the 2002 Winter Games in Salt Lake City.'
Which of the following is the most accurate and faithful answer the system can generate from the provided text?
Example RAG Prompt for the 2028 Olympics Question
A developer is building a system that uses a large language model to answer questions based only on a provided set of technical manuals. The system's highest priority is to avoid providing information that is not explicitly stated in the manuals. Which of the following instructions, when included in the prompt, is best designed to achieve this goal?
Diagnosing and Correcting a Factual Inconsistency Issue
Crafting RAG Prompt Instructions
Learn After
A developer is creating a question-answering system that uses retrieved text to generate responses. They have structured their prompt as follows:
Question: [user's question here]Context: [retrieved text here]Answer:Based on best practices for guiding a language model, what is the most critical component missing from this prompt structure?
You are building a system that uses a large language model to answer questions based on a set of retrieved documents. To ensure the model behaves correctly, you must structure the input prompt carefully. Arrange the following components into the most effective and logical order.
User Query Component in a RAG Prompt
A developer is building a customer support bot using a large language model. The bot must answer user questions based only on a provided set of product manuals to ensure accuracy and prevent misinformation. Which of the following prompt structures is the most effective and robust for this specific requirement?