been engaged on bettering my prompting abilities, and this is among the most essential classes I’ve learnt thus far:
The best way you speak to AI might steer it in a sure route that doesn’t profit the standard of your solutions. Possibly greater than you assume (greater than I realised, for certain).
On this article, I’ll clarify how one can unconsciously introduce bias into your prompts, why that is problematic (as a result of it impacts the standard of your solutions), and, most significantly: what you are able to do about it, so you will get higher outcomes from AI.
Bias in AI
Aside from the biases which are already current in some AI fashions (because of the coaching information used), comparable to demographic bias (e.g., a mannequin that associates ‘kitchens’ extra typically with girls than males), cultural bias (the mannequin associates ‘holidays’ extra readily with Christmas relatively than Diwali or Ramadan), or language bias (a mannequin performs higher in sure languages, often English), you additionally affect the skew of the solutions you get.
Sure, by way of your immediate. A single phrase in your query may be sufficient to set the mannequin down a selected path.
What’s (immediate) bias?
Bias is a distortion in the way in which a mannequin processes or prioritises info, creating systematic skewing.
Within the context of AI prompting, it includes giving delicate indicators to the mannequin that ‘color’ the reply. Typically, with out you being conscious of it.
Why is it a downside?
AI programs are more and more used for decision-making, evaluation, and creation. In that context, high quality issues. Bias can cut back that high quality.
The dangers of unconscious bias:
- You get a much less nuanced and even incorrect reply
- You (unconsciously) repeat your personal prejudices
- You miss related views or nuance
- In skilled contexts (journalism, analysis, coverage), it may injury your credibility
When are you at danger?
TL;DR: at all times, however it turns into particularly seen while you use few-shot prompting.
Lengthy model: The danger of bias exists everytime you give an AI mannequin a immediate, just because each phrase, each sequence, and each instance carries one thing of your intention, background, or expectation.
With few-shot prompting (the place you present examples for the mannequin to reflect), the chance of bias is extra seen since you give examples that the mannequin mirrors. The order of these examples, the distribution of labels, and even small formatting variations can affect the reply.
(I’ve primarily based all bias dangers on this article on the highest 5 commonest prompting strategies, presently: instruction, zero-shot, few-shot, chain of thought, and role-based prompting.)
Frequent biases in few-shot prompting
Which biases generally happen in few-shot prompting, and what do they contain?
Majority label bias
- The problem: Mannequin extra typically chooses the most typical label in your examples.
- Instance: If 3 of your 4 examples have “sure” as a solution, the mannequin will extra readily predict “sure”.
- Answer: Stability labels.
Choice bias
- The problem: Examples or context aren’t consultant.
- Instance: All of your examples are about tech startups, so the mannequin sticks to that context.
- Answer: Differ/stability examples.
Anchoring bias
- The problem: First instance or assertion determines the output route an excessive amount of.
- Instance: If the primary instance describes one thing as “low cost and unreliable”, the mannequin might deal with related gadgets as low high quality, no matter later examples.
- Answer: Begin neutrally. Differ order. Explicitly ask for reassessment.
Recency bias
- The problem: Mannequin attaches extra worth to the final instance in a immediate.
- Instance: The reply resembles the instance talked about final.
- Answer: Rotate examples/reformulate questions in new turns.
Formatting bias
- The problem: Formatting variations affect end result: structure (e.g., daring) impacts consideration and selection.
- Instance: A daring label is chosen extra typically than one with out formatting.
- Answer: Hold formatting constant.
Positional bias
- The problem: Solutions at the start or finish of an inventory are chosen extra typically.
- Instance: In multiple-choice questions, the mannequin extra typically chooses A or D.
- Answer: Change order of choices.
Different biases in several prompting strategies
Bias may also happen in conditions aside from few-shot prompting. Even with zero-shot (with out examples), one-shot (1 instance), or in AI brokers you’re constructing, you may trigger biases.
Instruction bias
Instruction prompting is essentially the most generally used methodology in the intervening time (based on ChatGPT). If you happen to explicitly give the mannequin a mode, tone, or position (“Write an argument towards vaccination”), this may reinforce bias. The mannequin then tries to fulfil the task, even when the content material isn’t factual or balanced.
Tips on how to stop: guarantee balanced, nuanced directions. Use impartial wording. Explicitly ask for a number of views.
- Not so good: “Write as an skilled investor why cryptocurrency is the longer term”.
- Higher: “Analyse as an skilled investor the benefits and downsides of cryptocurrency”.
Affirmation bias
Even while you don’t present examples, your phrasing can already steer in a sure route.
Tips on how to stop: keep away from main questions.
- Not so good: “Why is biking with out a helmet harmful?” → “Why is X harmful?” results in a confirmatory reply, even when that’s not factually appropriate.
- Higher: “What are the dangers and advantages of biking with out a helmet?”
- Even higher: “Analyse the security facets of biking with and with out helmets, together with counter-arguments”.
Framing bias
Much like affirmation bias, however totally different. With framing bias, you affect the AI by way of the way you current the query or info. The phrasing or context steers interpretation and the reply in a selected route, typically unconsciously.
Tips on how to stop: Use impartial or balanced framing.
- Not so good: “How harmful is biking with out a helmet?” → Right here the emphasis is on hazard, so the reply will doubtless primarily point out dangers.
- Higher: “What are folks’s experiences of biking with out a helmet?”
- Even higher: “What are folks’s experiences of biking with out a helmet? Point out all optimistic and all detrimental experiences”.
Observe-up bias
Earlier solutions affect subsequent ones in a multi-turn dialog. With follow-up bias, the mannequin adopts the tone, assumptions, or framing of your earlier enter, particularly in multi-turn conversations. The reply appears to wish to please you or follows the logic of the earlier flip, even when that was colored or flawed.
Instance situation:
You: “That new advertising technique appears dangerous to me”
AI: “You’re proper, there are certainly dangers…”
You: “What are different choices?”
AI: [Will likely mainly suggest safe, conservative options]
Tips on how to stop: Guarantee impartial questions, ask for a counter-voice, put the mannequin in a job.
Compounding bias
Significantly with Chain-of-Thought (CoT) Prompting (asking the mannequin to motive step-by-step earlier than giving a solution), immediate chaining (AI fashions producing prompts for different fashions), or deploying extra complicated workflows like brokers, bias can accumulate over a number of steps in a immediate or interplay chain: compounding bias.
Tips on how to stop: Consider intermediately, break the chain, purple teaming.
Guidelines: Tips on how to cut back bias in your prompts
Bias isn’t at all times avoidable, however you may positively study to recognise and restrict it. These are some sensible tricks to cut back bias in your prompts.

1. Examine your phrasing
Keep away from main the witness, keep away from questions that already lean in a route, “Why is X higher?” → “What are the benefits and downsides of X?”
2. Thoughts your examples
Utilizing few-shot prompting? Guarantee labels are balanced. Additionally range the order often.
3. Use extra impartial prompts
For instance: give the mannequin an empty discipline (“N/A”) as a potential end result. This calibrates its expectations.
4. Ask for reasoning
Have the mannequin clarify the way it reached its reply. That is known as ‘chain-of-thought prompting’ and helps make blind assumptions seen.
5. Experiment!
Ask the identical query in a number of methods and examine solutions. Solely then do you see how a lot affect your phrasing has.
Conclusion
In brief, bias is at all times a danger when prompting, by way of the way you ask, what you ask, and while you ask it throughout a collection of interactions. I imagine this needs to be a relentless level of consideration everytime you use LLMs.
I’m going to maintain experimenting, various my phrasing, and staying vital of my prompts to get essentially the most out of AI with out falling into the traps of bias.
I’m excited to maintain bettering my prompting abilities. Acquired any suggestions or recommendation on prompting you’d prefer to share? Please do! 🙂
Hello, I’m Daphne from DAPPER works. Preferred this text? Be at liberty to share it!