been engaged on enhancing my prompting expertise, and this is without doubt one of the most necessary classes I’ve learnt up to now:
The best way you speak to AI might steer it in a sure path that doesn’t profit the standard of your solutions. Possibly greater than you suppose (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 may get higher outcomes from AI.
Bias in AI
Aside from the biases which might be already current in some AI fashions (as a result of coaching knowledge used), akin to demographic bias (e.g., a mannequin that associates ‘kitchens’ extra usually with ladies than males), cultural bias (the mannequin associates ‘holidays’ extra readily with Christmas moderately 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 might be sufficient to set the mannequin down a selected path.
What’s (immediate) bias?
Bias is a distortion in the best way a mannequin processes or prioritises info, creating systematic skewing.
Within the context of AI prompting, it entails giving refined alerts 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 scale back that high quality.
The dangers of unconscious bias:
- You get a much less nuanced and even incorrect reply
- You (unconsciously) repeat your individual prejudices
- You miss related views or nuance
- In skilled contexts (journalism, analysis, coverage), it may well harm your credibility
When are you at danger?
TL;DR: at all times, nevertheless it turns into particularly seen whenever 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, at present: 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 usually chooses the commonest label in your examples.
- Instance: If 3 of your 4 examples have “sure” as a solution, the mannequin will extra readily predict “sure”.
- Resolution: Steadiness 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.
- Resolution: Range/stability examples.
Anchoring bias
- The problem: First instance or assertion determines the output path an excessive amount of.
- Instance: If the primary instance describes one thing as “low cost and unreliable”, the mannequin might deal with comparable gadgets as low high quality, no matter later examples.
- Resolution: Begin neutrally. Range 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.
- Resolution: Rotate examples/reformulate questions in new turns.
Formatting bias
- The problem: Formatting variations affect final result: structure (e.g., daring) impacts consideration and selection.
- Instance: A daring label is chosen extra usually than one with out formatting.
- Resolution: Preserve formatting constant.
Positional bias
- The problem: Solutions at the start or finish of an inventory are chosen extra usually.
- Instance: In multiple-choice questions, the mannequin extra usually chooses A or D.
- Resolution: Swap 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 possibly can trigger biases.
Instruction bias
Instruction prompting is probably the most generally used methodology for the time being (in accordance with ChatGPT). When you explicitly give the mannequin a method, tone, or function (“Write an argument towards vaccination”), this may reinforce bias. The mannequin then tries to fulfil the project, even when the content material isn’t factual or balanced.
Methods 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 long run”.
- Higher: “Analyse as an skilled investor the benefits and drawbacks of cryptocurrency”.
Affirmation bias
Even whenever you don’t present examples, your phrasing can already steer in a sure path.
Methods to stop: keep away from main questions.
- Not so good: “Why is biking and not using a helmet harmful?” → “Why is X harmful?” results in a confirmatory reply, even when that’s not factually right.
- Higher: “What are the dangers and advantages of biking and not using 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 completely 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 path, usually unconsciously.
Methods to stop: Use impartial or balanced framing.
- Not so good: “How harmful is biking and not using 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 and not using a helmet?”
- Even higher: “What are folks’s experiences of biking and not using a helmet? Point out all constructive and all damaging experiences”.
Comply with-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 need to please you or follows the logic of the earlier flip, even when that was colored or improper.
Instance state of affairs:
You: “That new advertising and marketing 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]
Methods to stop: Guarantee impartial questions, ask for a counter-voice, put the mannequin in a job.
Compounding bias
Notably 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 advanced workflows like brokers, bias can accumulate over a number of steps in a immediate or interplay chain: compounding bias.
Methods to stop: Consider intermediately, break the chain, pink teaming.
Guidelines: Methods to scale back bias in your prompts
Bias isn’t at all times avoidable, however you possibly can undoubtedly be taught to recognise and restrict it. These are some sensible tricks to scale back bias in your prompts.

1. Verify your phrasing
Keep away from main the witness, keep away from questions that already lean in a path, “Why is X higher?” → “What are the benefits and drawbacks of X?”
2. Thoughts your examples
Utilizing few-shot prompting? Guarantee labels are balanced. Additionally fluctuate the order sometimes.
3. Use extra impartial prompts
For instance: give the mannequin an empty discipline (“N/A”) as a attainable final 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 whenever 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 probably the most out of AI with out falling into the traps of bias.
I’m excited to maintain enhancing my prompting expertise. Acquired any ideas or recommendation on prompting you’d wish to share? Please do! 🙂
Hello, I’m Daphne from DAPPER works. Appreciated this text? Be at liberty to share it!