Example of a Prompt Template for Semantic Similarity
A prompt template with multiple variables can be used for comparing the semantic similarity of two sentences. In this application, literal text is used to frame the distinct variables for each sentence. For example, a template might use 'Here is a sentence' and 'Here is another sentence' as static framing text, where the actual sentences for comparison would be inserted as variables.
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
Example of a Prompt Template for Semantic Similarity
Constructing a Multi-Variable Prompt Template
A developer is building an application that uses a large language model to generate a paragraph comparing two distinct products. The application needs to take the names of both products as separate inputs. Which prompt template design is most effective and robust for this task?
Debugging a Prompt Generation System
A developer needs a language model to generate a one-sentence summary of a customer review. To do this, the developer will place the customer's review into a pre-defined text structure. Which of the following structures uses its fixed, unchanging text most effectively to instruct the model to perform this specific task?
Constructing a Prompt for Email Classification
Example of a Prompt Template for Semantic Similarity
A developer is using the text structure 'Here is some text: {unstructured_text}. What are the key-value pairs?' to extract information from a user's message. The model's responses are often conversational and not in the desired structured format. Which of the following changes to the fixed, instructional text would be most effective at guiding the model to produce a structured key-value pair output?
Learn After
A developer wants to build a feature that uses a language model to determine if two distinct pieces of text have a similar meaning. The system needs a reliable, structured way to present both pieces of text to the model for comparison. Which of the following input structures is most effective and robust for this task?
Diagnosing a Flawed Prompt for Text Comparison
Constructing a Prompt Template for Semantic Similarity