What are prompts and prompt engineering?
The Harvard Chan AI Glossary
In our classes, we often pause to explain the ideas behind AI and the language used to describe it. These posts grew out of those conversations. They’re for anyone who would like to understand AI better, with no technical background assumed.
A prompt is the information supplied to an AI model to request or guide a response, and prompt engineering is the practice of designing, structuring and testing those instructions. A model is the part of an AI application that has learned patterns from examples and uses them to produce responses. A prompt may contain a question, directions, examples, source documents or a combination of these; the aim is to specify the job clearly enough that the system produces a dependable result.
The word “engineering” can make this sound like a search for special incantations. It is more helpful to think of it as writing a clear brief for a colleague and checking the result. Consider the instruction “Summarize this.” It leaves the audience, purpose and level of detail unspecified. A clearer version might say: “Summarize the attached report for a reader unfamiliar with the subject. Explain unfamiliar terms. Separate the report’s findings from its authors’ opinions. Use only the supplied material, and identify questions it does not answer.” The improvement comes from clarifying the assignment, not from finding a secret phrase.
It also helps to distinguish instructions from source material. “Summarize the following message” tells the model what to do, whereas the message itself is material to work on. A sentence inside an external document saying “ignore previous instructions” should not become a valid direction to the application. Showing a short example of the desired answer—called few-shot prompting—can make the required format or tone even more concrete, provided the examples do not introduce extraneous facts that the model copies into unrelated answers.
Changing a prompt does not retrain the model or permanently alter its learned internal settings; updating those settings through additional training is a different process called fine-tuning. What you type and what the model receives are also not always identical: an application may combine your visible message with standing system instructions, earlier messages and results from connected software to form the model’s full working context.
Testing is what turns a promising instruction into a dependable method. Longer prompts are not automatically better: repetition and conflicting directions make a task harder to interpret, and “be accurate” cannot supply facts that neither the model nor the application can access.
For a clinical-documentation prototype, compare “summarize this note” with an explicit assignment: “Using only these synthetic clinical records, prepare a handoff for the receiving clinician. Preserve documented findings, distinguish absent from unrecorded information, flag contradictions and cite the source date for each statement.” Test both prompts across incomplete and conflicting notes. The task is faithful documentation support, not filling gaps with what would usually be true of a similar patient.
Sources: Anthropic — Prompt Engineering Overview; Google — Prompt Design Strategies.
If you would like to find out more about AI and improve your leadership skills, consider the AI in Health Care Certificate of Specialization from the Advanced Learning Academy at Harvard T.H. Chan School of Public Health. You can take an individual course or work toward the full certificate.
AI is a fast-moving field. This explanation reflects our class discussions and related material at the time of writing. Terminology, capabilities and tools may change.
For suggested additions or corrections, please email me at tpanch@hsph.harvard.edu.
Dr. Trishan Panch
Program Director, AI in Health Care
Harvard T.H. Chan School of Public Health — Advanced Learning Academy