Learn Before
Prompt Template for Strict Context Confinement
When provided context information is highly reliable, a prompt can strictly confine a Large Language Model to use only that text for its answer. An example format using a table of records is:
You are an expert tasked with generating answers from input queries. You have been provided with a query and corresponding context information, organized in a table where each row represents a useful record. Please generate an answer using only this context information. Ensure that you provide the answer in your own words. Context information: {table} Query: {query}
0
1
Tags
Foundations of Large Language Models
Ch.3 Prompting - Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Prompt Example for Restricting Answers to Tabular Context
A developer is building a chatbot to answer customer questions using only the company's official product documentation. To prevent the chatbot from providing inaccurate or external information, it is critical that its answers are derived exclusively from the text provided in the prompt. Which of the following instructions is best designed to achieve this strict limitation?
Crafting a Restrictive Prompt
Debugging a Non-Compliant AI Assistant
Prompt Template for Strict Context Confinement