What is a Prompt in AI?

Think of giving an assignment to a junior colleague. You explain the task, supply the relevant background, and say what you need back. A prompt serves that purpose when you work with a large language model. The instructions you provide shape the answer you receive.

“The more clearly you define the task, the less room for the AI to wander off track.”

Jonathan Nessler, Infinite Counsel, p. 110.

Understanding Large Language Models

Large language models are trained on large collections of text and generate responses from the information available to them. OpenAI’s GPT models are one example. Their uses include drafting, translation, and summarization. This is a form of generative AI.

What is a Large Language Model Prompt?

A prompt is the question, instruction, or material you supply to the model. It might be a single sentence or a document followed by a detailed request. It tells the model what work you want done and gives it information to use in its response.

Examples of Large Language Model Prompts

To better understand the concept, let's look at three examples of prompts for a large language model:

  1. Story Generation: If you're using a language model to generate a story, your prompt could be something like, "Write a kid's story about a cat named Bob..." The model will take this prompt and generate a story based on its training.
  2. Question Answering: For question-answering tasks, the prompt would be the question itself. For instance, if you ask, "What is the capital of France?" the model will generate the answer, "Paris."
  3. Translation: In the case of translation, the prompt would be the text you want to translate. If you input, "How are you?" and specify that you want it translated to Spanish, the model will output, "¿Cómo estás?"

What is AI Prompt Engineering

Prompt engineering means developing and testing instructions for a model. The task is to make your request clear enough that you can judge whether the answer meets it. Specify the subject, relevant facts, intended reader, and form of the response.

For example, a request to summarize a document leaves several choices open. A request for a 200-word summary for a client, with deadlines and unresolved questions identified, gives the model a more useful assignment.

Clear instructions help, but the resulting answer still needs review. Check the facts and any citations against the original material.

Read the first response as a draft. If it misses a condition or spends too much space on background, explain what needs to change. Follow-up instructions are part of the work.

You can also ask the model to help improve a prompt. Review its suggestions against your actual task before using them.

Start with a task you understand well. Write the instructions, examine the answer, and revise the request where needed. That comparison will teach you more than searching for a supposedly perfect prompt.