Back

Takeaways: Efficient Prompting Methods for Large Language Models: A Survey

Strategy

Automatic Prompt Engineering (APE)

Instead of writing and testing prompts by hand, this approach uses LLMs themselves to automatically generate and optimize instructions for different tasks. This makes it possible to achieve better results with less effort. Practical example:Explanation or prompt"Generate 5 different prompt variants that would best instruct another language model to summarize a legal text, then select and return only the one with the highest effectiveness.

Efficient Prompting Methods for Large Language Models: A Survey
Summary1/9

Strategy

Prompt Compression

Techniques that drastically shorten long prompts by removing unnecessary words, which reduces computational cost (token usage) and speeds up response time while preserving the key information needed to solve the task. Practical example Explanation or prompt"Shorten the following 10-page project context to the 5 most important bullet points, keeping only hard facts and numbers, before you send it on to the final business analysis."

Efficient Prompting Methods for Large Language Models: A Survey
Summary2/9

Strategy

Knowledge Distillation methods

Using the largest and most powerful models (so-called teachers) to create optimized sets of rules or patterns, which are then used to steer smaller, much cheaper models (so-called students). Practical example: Explanation or prompt"Analyze this complex dataset and, based on it, generate 3 simple, universal decision rules that a basic classification model should follow when evaluating similar tickets."

Efficient Prompting Methods for Large Language Models: A Survey
Summary3/9

Good practice

Minimizing unnecessary context (Context Filtering)

Keeping the prompt length to the absolute minimum. Instead of pasting an entire long document, filter it and give the model only the fragments relevant to the given query, which makes the model work faster and cheaper. Practical example: Explanation or prompt"Based solely on the 'Technical Requirements' section below, list the frontend technologies used. Completely ignore and skip the information about budget and marketing."

Efficient Prompting Methods for Large Language Models: A Survey
Summary4/9

Good practice

Separation of Instruction and Context

Good, efficient prompts have a clear structure that separates what the model is supposed to do (the instruction) from the working data it is supposed to operate on. This reduces the risk that the model treats the data as a command. Practical example:Explanation or prompt"INSTRUCTION: Translate the following text into French, keeping a formal tone. TEXT TO TRANSLATE: [Pasted text]"

Efficient Prompting Methods for Large Language Models: A Survey
Summary5/9

Good practice

Evolution-based tuning

Iteratively improving a prompt based on the faulty outputs you receive. Instead of building the perfect prompt from scratch, start with a simple instruction and modify it, adding specific constraints wherever the AI made a mistake. Practical example:

Efficient Prompting Methods for Large Language Models: A Survey
Summary6/9

Avoid

Prompt Inflation/Bloat

Avoid creating overly long and complicated prompts (so-called megaprompts) full of unnecessary detail for simple tasks. This drastically increases the cost of using the model API, and the extra words often just confuse it. Practical example: Explanation or prompt"You are an outstanding professor with 30 years of experience, you taught at Harvard and you love pizza. Think deeply, take a deep breath, use all of your powerful knowledge and just tell me what the formula for the area of a circle is."

Efficient Prompting Methods for Large Language Models: A Survey
Summary7/9

Avoid

Ambiguous instructions in long context

Avoid placing your main question or command in the middle of a huge block of text. LLMs suffer from the "lost in the middle" phenomenon, so they may ignore the instruction if it is not at the very beginning or end of the query. Practical example: Explanation or prompt"Here are 20 pages of a boring annual report. Somewhere on page 10 I mention that I would like you to calculate the average profit for Q2. Read the whole thing and generate an answer."

Efficient Prompting Methods for Large Language Models: A Survey
Summary8/9

Avoid

Ignoring token costs through excessive 'Few-Shot Prompting'

Avoid manually pasting dozens of examples of the task before you have made sure the model cannot do it with a short, well-worded instruction. Every additional example makes the query longer and costs valuable computational resources. Practical example : Explanation or prompt"[Pasting 50 bank transactions with a category added as an example] Now assign a category to this new transaction from the company XYZ." (Instead of simply using the instruction, e.g. "When assigning a category, choose from: Shopping, Fuel, Entertainment.")

Efficient Prompting Methods for Large Language Models: A Survey
Summary9/9