Steering LLM Fairness through Strategic Demonstration Selection

This direction is merged into another direction: intersectional fairness. Its last version stays readable and citable here.

Version 1 of 18 papers17 conceptsfrozen 2026-10-04

Large Language Models (LLMs) are increasingly used as "Swiss Army Knives" for tabular data tasks, such as predicting credit scores or insurance eligibility. In these low-data regimes, LLMs often outperform traditional gradient-boosted trees. However, they also inherit and amplify societal biases. Because these models are often too large to retrain or fine-tune for every specific fairness constraint, researchers have turned to a more immediate lever: the few-shot prompt.

The core insight across recent research is that the "fairness" of an LLM is not a fixed property of its weights, but a behavior highly sensitive to the distribution of examples provided in its context window. By strategically selecting or synthesizing these demonstrations, we can steer a model toward demographic parity without modifying a single parameter.

The Prompt as a Decision Threshold

When an LLM performs in-context learning (ICL), it doesn't just learn the task format; it adopts the statistical distributions presented in the prompt. Valeriia Cherepanova, Chia-Jung Lee, and their colleagues demonstrate in Improving LLM Group Fairness on Tabular Data via In-Context Learning that the ratio of positive to negative outcomes shown for different demographic groups acts as a "tuning knob" for fairness.

If a model is biased against a disadvantaged group, practitioners can intentionally increase the proportion of positive labels for that group within the few-shot examples. This effectively shifts the model’s internal decision threshold, nudging it to equalize selection rates across protected classes. This mechanism allows for precise control over group-level selection rates simply by manipulating the prompt's composition.

Prioritizing Minority Representations

Beyond just balancing labels, the specific choice of which individuals to include matters. Jingyu Hu 0002, Mengnan Du, and Weiru Liu argue in Strategic Demonstration Selection for Improved Fairness in LLM In-Context Learning that the model's fairness is disproportionately affected by the presence of minority group samples.

They propose the Fairness via Clustering-Genetic (FCG) algorithm to select demonstrations that maximize demographic parity. Their findings suggest that in many cases, making minority samples the entirety of the demonstration set can significantly boost fairness metrics. This works because it forces the model to "see" the minority group as the primary reference point for the task, reducing the influence of biased priors learned during pre-training.

Fair Wasserstein Coresets

A significant challenge in this approach is the limited context window of LLMs. You cannot simply feed the model a massive, balanced dataset. You need a tiny, highly representative, and mathematically fair subset.

Zikai Xiong, Niccolò Dalmasso, Freddy Lécué, and their team addressed this by developing Fair Wasserstein Coresets (FWC), as detailed in Fair Wasserstein Coresets.

The intuition behind FWC is two-fold:

  1. Representativeness: Use the Wasserstein distance to ensure the small set of synthetic points (the "coreset") geometrically matches the distribution of the original massive dataset.
  2. Constraint: Enforce demographic parity directly during the coreset generation process.

The result is a handful of synthetic, weighted data points that serve as a "distilled" version of a fair world. When these coresets are used as few-shot demonstrations, they guide models like GPT-4 toward equitable predictions, reducing demographic bias by up to 75% without requiring any architectural changes or expensive fine-tuning.

Why It Works: Local Alignment

This research direction suggests that LLMs function as highly flexible Bayesian reasoners. The pre-trained weights provide a broad (and often biased) prior, but the in-context demonstrations provide a "local likelihood."

By carefully constructing this local environment—whether through label manipulation (Cherepanova et al.), minority prioritization (Hu et al.), or geometric coreset synthesis (Xiong et al.)—practitioners can align the model's output with fairness objectives at inference time. This shifts the burden of fairness from the model's training phase to the data selection phase, making ethical AI more accessible for practitioners working with frozen, third-party APIs.

Papers in this version

History & citationVersion 1 · 2026-10-04

Merged into another direction · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_steering_llm_fairness_through_strategic__1360bdce,
  title = {Steering LLM Fairness through Strategic Demonstration Selection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/steering-llm-fairness-through-strategic-demonstration-selection/rdr_1360bdce0dd143c5a50fb0d681484492},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 1, frozen text):

@misc{lacuna_steering_llm_fairness_through_strategic__1360bdce_v1,
  title = {Steering LLM Fairness through Strategic Demonstration Selection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/steering-llm-fairness-through-strategic-demonstration-selection/rdr_1360bdce0dd143c5a50fb0d681484492/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-23},
}