Prompting a language model
A language model writes by predicting the next token from probabilities, and the concept and the strategy behind a text have to come from the person prompting it. A prompt is built from parts, such as a role, a task, context, constraints and examples, and is corrected in conversation with the model rather than written once. A prompt that a team reuses is kept in a library and versioned against the model and its settings.
How a language model produces text
Language models are to be imagined as calculators. As of 2023, they cannot process text or spoken words directly, so language is broken into smaller units called tokens, which may be single characters or punctuation marks, sub-words, whole words or even whole sentences, depending on the language, the model and the tokenisation method, which may be rule-based, statistical or neural. A token is not always a whole word, and the way words are broken up illustrates where the problems in generating text lie.
Each token is given a numerical ID, because the models of 2023 process only numbers. The model then selects the most likely next token given the context and specific parameters or settings, such as word embeddings and the self-attention mechanism, so each word is chosen on its likelihood of following. The models are mathematical functions and powerful calculators, and they cannot think. They are word calculators that fill in the blanks and sophisticated prediction engines for the words that come next, and a probability distribution and the certainty scores applied to it determine their output. That they cannot think is an important factor to consider in assessing their results, setting expectations of them and highlighting their limitations.
Large language models work, on a very large scale, as the game Wordle does, anticipating a word through a series of guesses. The system gives a word prediction: it is a large language model, not a large information model, and using it as Wikipedia, to get information, is, as of May 2024, a mistake a lot of people make. Given the word "they" there are millions of ways a sentence could continue, while "they wanted to go to the" condenses them, and that is the way to think about using AI. The more instruction, information and guidance a model is given, the better its output.
As of 2023, performance does not depend only on the quantity and quality of the training data, which is what the excitement around each new model fixes on. It also depends on the model's characteristics, among them the transformer architecture, fine-tuning and the combination of models, on the tokenisation method and on human skill, such as prompt engineering. So instructions and guardrails are needed, to help the model in its decisions. As of December 2025, the output also depends on the quality of the input data and the specificity of the prompt, and optimising the two can help improve it.
In a December 2023 account, a person who thinks "fish" thinks of something particular, such as salmon, a goldfish, a shark or the fish on a plate, but the model does not know which fish is meant and has to allocate something to the token it is processing, so on probability it might take goldfish. From then on it uses goldfish, where salmon was meant. The systems of that date are very smart but also very stupid without instructions, so the person prompting them has to have the concept and the strategy first.
As of December 2023, hallucinations are very normal, because the world cannot be read by the machine: it is turned into tokens, processed by algorithms with decoding and attention mechanisms, and turned back into words on the way out, and a hallucination is a wrong guess at what fills the blank, a consequence of word calculation. Hallucination and creativity are, in a May 2024 account, two sides of the same coin, the generative side of the system, called hallucination when it is not in the user's favour and creativity when it is.
As of May 2024, expecting the models to be consistent is a misconception: a prompt that gives one output today can give a totally different one tomorrow. Prompted almost always the same way to draw the same woman, a text-to-image generator in December 2023 came out with a different one each time, which is very typical of the models once it is understood how they work. The text-to-text models of that date give diverse output too, and never the same result twice.
What prompt engineering is
As of 2023, two different kinds of thing go under the name prompt engineering: the instructions users input to a model, and the work done further down by IT specialists. Sophisticated prompt engineering, giving the model specific and detailed instructions that guide it in its decisions or predictions, can enhance its performance. Its techniques include zero-shot, one-shot and few-shot prompting, few-shot prompting supplying a few input–output examples; chain-of-thought prompting, which uses sequential prompts to encourage reasoning or to guide the model through a complex task; and prompt iteration. Depending on the task, few-shot prompting, chain-of-thought prompting and prompt iteration had been found, as of September 2023, the most successful at raising a model's performance.
In one speaker's view, prompt engineering is an art rather than a very technical skill, although it sounds like one: conversing with a tool and creating prompts that get precise, coherent and pertinent responses, where, garbage in, garbage out, a lot depends on what the tool is asked. It involves soft skills that writers should have and do have, analytical thinking, communication, critical evaluation, reflective practice, creative thinking and a collaborative mindset, so it is nothing to be scared of, and it is learned by exploring, interacting and making mistakes.
Writers are the professionals best suited to writing effective prompts, and nobody needs to be a software developer, a data scientist or an AI researcher to be good at it. The writer to take as a pattern is the technical writer of the 200-page booklet that comes with a vacuum cleaner, because being as specific and as detailed as possible in the guidance given to the model is the way to get the best possible response.
Specific instructions
A language model can be thought of as an intern. It is best thought of as a person, even though it is not one, rather than as software: as of May 2024, millions of people have just acquired free interns, weird and somewhat alien, who work infinitely fast and sometimes like to please, but interns nonetheless. On its first day such an intern knows nothing but has an infinite potential for knowledge, and every mistake that can be made will be made unless it is guided exactly according to the instructions. The writer's own subject knowledge and experience can bring out the best in the tools, so someone else using the same tools might not get the same outputs.
An intern asked only to fetch coffee will try their best and the person who asked will probably be disappointed, because nothing said what size of cup, or whether black or with cream and sugar. The model cannot read the mind of the person prompting it any more than the intern can, so the rule is not to make the AI guess and to be specific about what is needed. A prompt does not have to be complicated, but it has to be clear.
Every use of AI has to be task-based, and writers and translators do not simply write or translate: the work breaks into tasks such as reviewing, comparing, justifying, researching, understanding, explaining, summarising, simplifying, transcribing, subtitling, evaluating, shortening and communicating, and those tasks are the basis of the prompts.
Two basic concepts to keep in mind in writing a prompt, as of March 2024, are the token limit and the processing capacity of the model in use. If the model has to figure out the context itself, it uses processing power it would otherwise use to execute the task assigned, and it may not even understand a context it is not given. So a prompt always provides context, and begins by stating what the writer is trying to do and why. One systematic reviewer, for the same reason, put MI rather than non-fatal MI in a prompt, since the studies report MIs and not non-fatal MI, so that the tool would not spend capacity working out that the two are the same, and gives the model as much as possible ready on a plate.
As of March 2024, the token limit per interaction is clearly stated, as a number, and as a rule of thumb a thousand tokens are about 750 words of text.
The parts of a prompt
In the anatomy of a mega prompt, state the persona the model is to adopt, give it the task, set out as many steps and as much detail as wished, the more the better, provide context and constraints, with examples for few-shot prompting, and take time over defining the output wanted, for tone of voice as well as length and formatting.
Many styles can be asked for, and they are pretty much self-explanatory, such as technical, creative and explanatory. Medical writing wants the formal and analytical tone, which is ideal for academic and professional contexts, and as of December 2023 the model also does the technical and instructional, or the storytelling and engaging, tone very well.
One prompting playbook has seven rules, in this order. Give the model a role, such as scientist, medical writer, consumer or patient, which gives it a lot more information than it would otherwise have. Give it a goal, the thing being produced, such as a patient consent form, an academic article or a systematic review. State the level, because writing for a patient with rudimentary scientific knowledge differs from writing for a group of senior professors, and the model can tailor its output to the reader. Give it examples, which is few-shot prompting: an example, such as a good clinical trial report or a best-practice introduction section, teaches style, structure and writing level, as examples teach a student in a way theory alone does not, and, in one practitioner's experience at least, the more examples, the better the output can be. Add personalisation, for requirements the writer has that others do not or for a client's special instructions, such as restricting a literature search to the last three years in a field where anything four years old or older is not going to be relevant. Add constraints, which say what the model should not do where the first five say what it should, and which can sometimes matter even more: an output that gives a summary instead of what was asked should be fixed by telling the model not to give one, with or without a please, either by revising the original prompt and rerunning it or by going on in the conversation. For those already playing with the tools, give step-by-step instructions: document the steps the work process takes, perhaps ten to fifteen, and give them one at a time, because a whole workflow shoved into one prompt is more than likely to confuse the model as it would confuse a newcomer on the first day.
A sample prompt built on these rules reads: You are a science writer writing an article for the New England Journal of Medicine. Write an exhaustive literature review on the main symptoms of colon cancer, including gaps in the research. Focus on research published in the last few years. Do not include an introduction or conclusion. It is a very basic prompt, and, as of May 2024, one practitioner's own prompts run up to five pages.
A prompt has similarities with a search strategy for databases such as Medline and Embase, which in some cases may, as of May 2024, be considered a better option than ChatGPT, but it differs from one. A search strategy relies on keywords, connectors such as OR and AND and a framework that combines them; a prompt gives a full context rather than keywords, so a good one can run to two or three pages, or take the form of a prefilled prompt, partly to make up for the model's knowledge cut-off.
One medical writing services team, as of December 2025, designs the pre-programmed prompts of its structured-content platform in five steps: assign a role; provide context on the persona, the desired output and style, and the target audience; describe the task in detail; give instructions on failure and edge cases and on what a bad result looks like; then refine and iterate.
A good starting point for building a prompt is the mnemonic PLANTS: persona, length, audience, nuance, type and style guide. As of Summer 2024, a prompt that fails can sometimes succeed once one or two examples are put inside it, which is one-shot or two-shot prompting.
Constraints
Besides context, a prompt always provides restrictions, for guidance. One systematic reviewer, as of March 2024, follows a request for a list of the generic names of all the drugs in a class with the restriction "No other output is required", because without it the model gives an account of how the drugs act and what they are used for, and a list of brand and generic names. In the same reviewer's experience the word "exhaustive" is useful in asking for any list, although with ChatGPT a list of more than twenty items is more than likely to come back as the top twenty even with the word, and the reviewer then asks, again and again, whether the previous response was an exhaustive list. The reviewer's way of ensuring there are no hallucinations is to tell the model not to extrapolate or deduce information, and either to omit from its response completely anything the provided text does not contain or to state that it is not provided. The reviewer also asks for all relevant numerical values, because a summary from a language model usually reports no numbers. Register is restricted too, since without specific guidance and restrictions ChatGPT's output, as of March 2024, does not sound a hundred percent scientific: no metaphorical language, storytelling elements or subjective descriptions, a focus on clearly detailing the study's objectives, design, methods and results, and the formal tone of a scientific paper, with an emphasis on clarity, conciseness and objectivity.
Other example constraints are useful for prompting. Ask for unique, non-repetitive responses, since the model, as of December 2023, repeats itself: it predicts words on their likelihood of following and does not check whether it has already said something. Ask it to offer viewpoints, which is best done together with iterative prompting. Tell it to favour logical arguments. Tell it to avoid moralising, which really helps and makes a difference to style and tone.
The same systematic reviewer, as of March 2024, ends pretty much every prompt that involves analysing a PDF with an instruction to scan the entire document, including all tables and figures, before generating a response, because the model stops looking as soon as it finds relevant information, and the same or additional information may be elsewhere in the document.
Types of prompt
One speaker lists six types of prompt. A direct prompt is a straightforward inquiry for a specific answer, such as an article on the impact of digital health technologies on patient care management, focusing on tools developed in the last five years. A request-list prompt asks for a list or a series of information, such as the key points a review article on the same subject should cover, naming what must be included. A summary prompt asks for a condensed overview, can state the length, 200 words or 400, and names the areas to focus on. A process prompt asks for a stepwise explanation, such as the stages of writing a review article on a named topic. A comprehensive prompt asks for a detailed overview weighing similarities and differences, naming the aspects to cover, such as the history, the recent technological advances and the future developments. Whatever it names is what the response will be about. A conversational prompt converses with the tool in a persona, such as acting as a medical writer to explain how digital technologies have recently transformed patient care management, where the persona could as well be a famous person, a leader or a politician.
The CLEAR framework
In the CLEAR framework an ideal prompt is concise, logical, explicit, adaptive and reflective: the first three concern how a prompt is structured, and the last two the strategy for the prompts that follow it.
- Concise: cut what is not relevant and do not be ambiguous, as in a request to summarise the latest treatment options for schizophrenia, highlighting new pharmacological advances and patient-care guidelines, limited to research findings from 2023.
- Logical: order the information so that the context and the relationships are established, and say what is expected back, as in a comprehensive overview of the management of type 2 diabetes for primary care physicians, including the latest guidelines on medication, recent advances in treatment and practical advice.
- Explicit: specify the length, where the information is to come from, the terminology, the instructions and the format, the tone and the reading level, such as a lay person, a patient or a doctor, and name the guideline the answer should draw on, as in ICH GCP on documenting clinical trials.
- Adaptive: be willing to rephrase, restructure, make mistakes, adjust the settings and parameters and try different approaches, without thinking of a prompt that is not good as failure, since one ideal prompt is never going to happen; the example tells the tool that the guide it provided last time on documenting clinical trials lacked examples of handling patient data under the GDPR, and asks for a section of detailed examples.
- Reflective: evaluate what went right and wrong and carry the insight into the next prompt, as when a writer, reflecting on the previous discussion, notices that integrating patient feedback into the trial results was never covered and asks for a section on the methods for gathering and analysing it.
Iterating in the conversation
Prompt iteration is important because the tools, as of December 2023, are designed as chatbots: they like interaction, which gives them guidance and lets them relate their output to what was prompted. Stepwise instructions can be built into the prompt, with an instruction to stop at a given point and ask before continuing, to improve the results. A writer unsure how to write a prompt can ask the model to write it, and in accounts from December 2023 and May 2024 that works. A Google search is asked once and ends, but a prompt opens a conversation, so where the result is not what was wanted the iteration continues in the same conversation, as an intern who brings back black coffee is sent for two sugars and then for cream. Users of one structured-content platform can, as of December 2025, also refresh the session and start a new chat, iterate the prompts and ask follow-up questions.
The unit of work stays small: ask a specific question, take that piece of information out and keep building, rather than asking the model to solve one big problem, which works when done in small paragraphs.
When the output is wrong, the answer is to say what it did not get right and ask again, until the output wanted is reached, as with a student who did not get a concept the first time, and setting the tools aside after one attempt that did not work is a mistake. A miss can be because the tool lacks the capability, because it is being used in the wrong way or because the instruction was not clear enough. It takes a lot of trial and error, and there is no perfect prompt or perfect prompt strategy: a writer starts with something, evaluates the output, refines and tries again until the result is up to par.
A trained writer's first instinct on a disappointing output might be to fix it by hand, and probably the main lesson is to have the model fix it instead. An answer that is too long is sent back as too long, to be made one paragraph, rather than shortened by hand; one that is too simple is sent back to be written at an expert level, with the audience stated as college level and higher; and one that is too complex is sent back to be simplified, as bullet points, as a table or, where the sentences are too long and convoluted, at a simpler, lower register.
One attendee found in May 2024 that GPT output often uses flowery language, and that a model told to simplify tends to choose more basic words rather than simpler grammar. One translator suggests trying two things: ask straightforwardly for the syntax and the grammar to be simplified and the terminology and vocabulary left alone, or specify the target audience. Asked in a quick test in May 2024 to rewrite a text for three different school levels, ChatGPT adapted the grammar and syntax correctly to each. The most powerful prompt, or opening of a prompt, is probably "rewrite", followed by who or what the text is to be rewritten for. In one practitioner's experience, a few lines of the writer's own thoughts, not glamorous and not necessarily grammatical, written the way the writer thinks and wants the text written, teach the model the kind of style wanted, while it still corrects the grammar, which is a few-shot example.
A format can always be asked for. A glossary returned as a list is of little help to an interpreter, whose glossaries usually have to be bilingual and so have to be tables, so the request names the format: a glossary on type 2 diabetes, bilingual English to Spanish, in table format, or as bullet points, or as a comma-separated file to import into Excel for a glossary program. The same specificity reaches extraction: with Microsoft Copilot, as of May 2024, a single prompt can ask, of a page about greenhouse gases, for all the greenhouse gases on it in a three-column table of chemical composition, Spanish name and English name, with a fourth column added for a definition or an example, and the tool will do all of it. The more a writer plays with the tool, the more prompts they find that work for them.
"Explain the meaning of this text", run on a passage before it is translated, returns, as of May 2024, both a rewording and an explanation, in the language asked for, so the writer can make sure the passage has been understood. Meta-prompting asks the model what it can be asked: asked for five tasks generative AI could help medical writers with, and then for three ready-to-use prompts for each in a table saying what each prompt does and giving it exactly as it should be pasted into the chatbot, ChatGPT produced fifteen prompts for medical writers in May 2024.
Reusing prompts
A long, refined prompt is not written again each time, which answers the objection that it is not worth the time for one sentence. One translator's most-used prompts are, as of May 2024, stored in a text-expansion program, Phrase Express, called up with a shortcut, picked with the arrow keys and entered into the chat with the enter key; the program was free and took about an hour to learn.
In one regulatory writer's view in 2026, the prompts given to an AI tool play a vital role: the same table given to two people comes back as different output from their two prompts. Once the building of the tool is over, prompt building is the crucial next phase, and it should have a strategy, stating which writer is asking, which document is being worked on and exactly what is wanted, so that what is needed arrives on the first prompt or at least the second.
A prompt library is a key part of a standardised process, such as one for a clinical study report that can be reproduced every single time and that every medical writer can use: work out what the question will be at each point and build the prompt into the templates and the work instructions. One writer gives, as of May 2024, "redraft this in past tense", followed by the pasted future-tense text, as a simple prompt that works every single time, and says that what is wanted is the reproducibility of prompts. The same writer gives as a drawback that the tool does not always get it right, and the writer then has to think on their feet, rework the prompt and redraft. However much library and process there is, the work still needs the human at the end, and a prompt library needs a backup plan as a standard operating procedure does: the procedure may say to use the investigator's brochure to write the protocol, and for a client who has no brochure the writer falls back on the briefing book.
What works, in one speaker's view, is a template for the prompt, with a fixed component, set up with the guidelines and possibly specific to the deliverable, and a variable component for what differs from job to job, such as the brand or the study type, so that the writer only fills in the variable part. One team, as of May 2024, simplifies the work with a prompt library of, say, five hundred prompts, seed prompts built in and organised in advance, so that a writer need not learn about prompting but says what they want to do and the prompt arrives. Someone else can build the library, as a separately identified project with focused effort, so that the team has it and writers need not invest their own time in building it each time.
As of May 2024, language models are quite good at generic summarisation, but it might not answer a medical writer's requirements, so one tool's developers write sometimes very complex prompts to make the model consider those requirements.
A prompt library of successful, reliable use cases gives a set of flexible guardrails that further improve quality and reduce risk. The record should include not only what works but what does not, so that failed prompts can potentially be revised or revisited as models improve.
Consistency across runs and models
One publisher's content-innovation team observed in 2024, most of the time, that the same prompt, with the same model and the same input, gave different results. Setting the generation parameters properly, temperature, top-p and the frequency penalties among them, gave the team very consistent results.
With the parameters set, the team went ahead with prompt versioning: it runs the same prompt with the same model and the same parameters and looks at how far the output differs from the previous output, a very minute difference being fine, where in earlier days the output would change completely. When a new model is released the current prompt, parameters and setup are tested on it unchanged, and the new model is accepted if it performs better, or the prompt, the parameters and everything else are changed until the results are better; each new version is logged, whether a new prompt or the same prompt and parameters on a new model. In one 2024 example the team gave, the same setup gave better output on GPT-4o than on the earlier GPT-4 1106 model, and acceptable rather than equally good quality on GPT-4o mini.
The team's prompt for creating a derivative from an original article became, after fifty or sixty rounds of processing, what it calls a gold-standard prompt, built on different guidelines, instructions and the editors' and authors' expertise. The team regards that prompt as its unique selling point, and gave its conversions with it in 2024 as reaching 90% quality.
One systematic reviewer used the free version, ChatGPT 3.5, to publish an almost complete systematic review, and holds, as of March 2024, that all the steps can be performed with it, though the prompts may need adjusting quite a bit, by giving the appropriate context and background, since a one-line prompt is not likely to work. To make ChatGPT 3.5 follow simple rules, such as giving the citations in Chicago style, the reviewer's prompt ran to about five pages, because it gave examples, while version 4 needed three lines stating the rules.
All language models rest, as of March 2024, on pretty much the same principles, so the same reviewer expects the prompts the reviewer provided to work in any model with minor adjustments.