Member-only story

Mastering Prompt Engineering: Essential Insights

Pradeep Pujari
5 min readSep 19, 2024

What is a Prompt?

A prompt is an input to a Large Language Model, that is used to guide its output. Prompts may consist of text, image, sound, or other media. To automate prompts, we can use prompt template. A prompt template is a function that contains one or more variables which will be replaced by its value at run time. For example:

Some Terminology

text-based prompting techniques: All of us know that better prompts lead to improved results across a wide variety of tasks. Now the question arises how to write better prompts? Is it a science or art? Is there a scientific approach to this problem?

In-Context Learning (ICL): A frozen Language Model ( No gradient updates alowed) performs a task only by conditioning on prompt text.

What is the meaning of Exemplar: In Prompt Engineering, an exemplar refers to an example or instance provided to a large language model (LLM) to guide its behavior or response during tasks like few-shot learning.

There are 3 ICL tasks we can study here.

Zero-shot Prompting- No example. The model should perform a given task ( i.e. infer ) solely on task description. No gradient updates are performed.
Translate English to French ← — Task Description
Cheese => ← —…

--

--

Pradeep Pujari
Pradeep Pujari

Written by Pradeep Pujari

AI Researcher, Author, Founder of TensorHealth-NewsLetter, ex-Meta

No responses yet