Example

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

Updated 2025-10-09

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