Learn Before
  • Example Question for RAG-Based Answering

Example of a Hybrid Prompt Combining RAG and Tool Use

A prompt can be designed to provide a Large Language Model with multiple avenues for formulating an answer. Such a hybrid prompt might combine instructions for using external tools with pre-retrieved information. For instance, the prompt could begin with instructions like, 'Your task is to answer the following question. You may use external tools, such as web search, to assist you,' followed by the user's query, 'Where will the 2028 Olympics be held?'. It can then introduce the provided context by stating, 'The information regarding this question is given as follows:'. This structure gives the model the flexibility to synthesize an answer from the given texts or to perform its own search if the context is inadequate.

0

1

6 months ago

Contributors are:

Who are from:

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?

Learn After
  • An AI assistant is tasked with answering a user's question. Its prompt is structured to include both a set of pre-retrieved documents related to the query and instructions that permit it to perform a live web search. What is the primary strategic advantage of this combined approach?

  • Improving an AI Travel Assistant's Accuracy

  • Constructing a Hybrid AI Prompt