Alternative Prompt Formats for Machine Translation
When framing machine translation as a text generation task, various prompt structures can be used. Common methods include a question-answer format, a direct instruction-like template, and a code-like template that mimics a programming language structure.
0
1
Tags
Ch.2 Generative Models - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Example of Reframing Text Classification as Text Generation
Instruction-based Prompts
Few-Shot Learning
Alternative Prompt Formats for Machine Translation
Text Classification in NLP
Versatility of Prompt Templates
Grammaticality Judgment as a Binary Classification Task for LLMs
Formal Definition of LLM Inference
Illustrative Purpose of Prompting Examples
The paradigm of using Large Language Models (LLMs) allows for many different NLP tasks (e.g., translation, sentiment analysis) to be reframed as a text generation problem. What is the fundamental advantage of this approach over traditional methods that required building a separate, specifically trained model for each individual task?
Reframing a Traditional NLP Task
Choosing an NLP Development Strategy
Classification via Prompt Completion
Reframing Numerical Scoring as Text Generation
Learn After
Example of a Prompt Template for Machine Translation
Code-like Prompt Templates
A developer is testing different ways to ask a language model to translate the English sentence 'The cat sat on the mat' into French. Consider the following three approaches:
Translate the following English text to French: The cat sat on the matEnglish: The cat sat on the mat Question: What is the French translation of this English sentence? Answer:- `def translate_to_french(english_text): """Translates the given English text to French.""" return model.translate(english_text)
input = "The cat sat on the mat" output = translate_to_french(input)`
Which option correctly identifies the format of each approach?
Examples of Instruction-like Prompts for Language Models
Improving Idiomatic Machine Translation
Constructing Machine Translation Prompts