Learn Before
Prompt Example for Restricting Answers to Tabular Context
The following is an example of a prompt designed to restrict a Large Language Model's answers to a provided tabular context:
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.
This prompt instructs the model to adopt an expert persona, use the query and tabular data, and generate a paraphrased answer based solely on the given information.

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
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
Learn After
Critical Evaluation of a Context-Restricting Prompt
Refining a Prompt for Context-Specific Answers
A developer is using a large language model to answer questions based on a specific data table. To prevent the model from inventing information, which part of the following prompt is the most crucial instruction?
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.