Learn Before
Constraining LLM Outputs with Provided Text
A common application of providing reference information in prompts is to constrain the output of a Large Language Model. By supplying relevant text, the model is guided to generate responses that are grounded in and confined to the provided information, rather than making unconstrained predictions based on its general knowledge.
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
Constraining LLM Outputs with Provided Text
Leveraging Prior Knowledge in Prompts for Real-World Problems
A user wants a large language model to answer questions about the internal policies of a specific, private company. The model was not trained on this company's private data. Which of the following prompting strategies would be most effective for ensuring the model provides accurate, relevant answers based on the company's actual policies?
Customer Support Chatbot Prompt Design
Retrieval-Augmented Generation (RAG) as an Application of Reference Information
A developer is creating a feature to summarize newly published, highly technical research papers for a general audience. The language model being used has a knowledge cut-off from two years ago. To ensure the summaries are accurate and reflect the content of the new papers, the developer includes the full text of each paper within the prompt before asking for a summary. What is the primary analytical reason this approach is effective?
Learn After
Prompt Example for Synthesizing Answers from Provided Context
Restricting LLM Answers to Provided Text
Prompting LLMs with Retrieved Texts in RAG
A developer provides a language model with a specific piece of information:
Context: 'The fictional city of Aeridor was founded in the year 982 by Queen Elara.'The developer then asks the model:Question: 'When was Aeridor founded?'The model, however, responds with:Answer: 'Aeridor was founded in the 12th century.'Which of the following statements best analyzes the most likely reason for the model's incorrect response, despite being given the correct information?Internal Knowledge Base Chatbot Design
A developer is building a customer support chatbot that must answer questions using only the information from the company's official 'Return Policy' document to avoid providing inaccurate or outdated advice. Which of the following prompt strategies is the most effective for constraining the model's output to the provided text?