Example

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

Updated 2026-04-29

Contributors are:

Who are from:

Tags

Foundations of Large Language Models

Ch.3 Prompting - Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences