mlsanityData to 13 Oct 2026

Using In-Context Learning to Improve Dialogue Safety

arXiv 2302.00871 ↗First posted 2 Feb 2023cs.CLcited by 42

Not on the map. Why?

Abstract (arXiv)

While large neural-based conversational models have become increasingly proficient dialogue agents, recent work has highlighted safety issues with these systems. For example, these systems can be goaded into generating toxic content, which often perpetuates social biases or stereotypes. We investigate a retrieval-based method for reducing bias and toxicity in responses from chatbots. It uses in-context learning to steer a model towards safer generations. Concretely, to generate a response to an unsafe dialogue context, we retrieve demonstrations of safe responses to similar dialogue contexts. We find our method performs competitively with strong baselines without requiring training. For instance, using automatic evaluation, we find our best fine-tuned baseline only generates safe responses to unsafe dialogue contexts from DiaSafety 4.04% more than our approach. Finally, we also propose a re-ranking procedure which can further improve response safeness.

Key facts. Cited by 42 papers in the map (data through 13 Oct 2026). Builds on 65 of its 91 references that are in the map. First posted on arXiv 2 Feb 2023.

Builds on

65 of 91 references.

References · 65

  1. 2017Attention Is All You Needcited by 60,106
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,304
  3. 2014Adam: A Method for Stochastic Optimizationcited by 37,093
  4. 2020Language Models are Few-Shot Learnerscited by 32,320
  5. 2022Training language models to follow instructions with human feedbackcited by 15,856
  6. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,221
  7. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,107
  8. 2017Deep reinforcement learning from human preferencescited by 3,871
  9. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,797
  10. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,691
  11. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,500
  12. 2022Constitutional AI: Harmlessness from AI Feedbackcited by 3,011
38 more
  1. 2022Scaling Instruction-Finetuned Language Modelscited by 3,007
  2. 2019The Curious Case of Neural Text Degenerationcited by 2,893
  3. 2019Fine-Tuning Language Models from Human Preferencescited by 2,139
  4. 2022LaMDA: Language Models for Dialog Applicationscited by 1,219
  5. 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,201
  6. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,191
  7. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,126
  8. 2021A General Language Assistant as a Laboratory for Alignmentcited by 1,041
  9. 2020MPNet: Masked and Permuted Pre-training for Language Understandingcited by 976
  10. 2021GLaM: Efficient Scaling of Language Models with Mixture-of-Expertscited by 896
  11. 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 891
  12. 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 797
  13. 2019CTRL: A Conditional Transformer Language Model for Controllable Generationcited by 757
  14. 2023The Flan Collection: Designing Data and Methods for Effective Instruction Tuningcited by 736
  15. 2021Learning To Retrieve Prompts for In-Context Learningcited by 643
  16. 2020Recipes for building an open-domain chatbotcited by 593
  17. 2018Wizard of Wikipedia: Knowledge-Powered Conversational agentscited by 530
  18. 2022Improving alignment of dialogue agents via targeted human judgementscited by 529
  19. 2018Texygen: A Benchmarking Platform for Text Generation Modelscited by 486
  20. 2021MetaICL: Learning to Learn In Contextcited by 452
  21. 2021DExperts: Decoding-Time Controlled Text Generation with Experts and Anti-Expertscited by 437
  22. 2022ToxiGen: A Large-Scale Machine-Generated Dataset for Adversarial and Implicit Hate Speech Detectioncited by 421
  23. 2021Self-Diagnosis and Self-Debiasing: A Proposal for Reducing Corpus-Based Bias in NLPcited by 337
  24. 2022Can language models learn from explanations in context?cited by 249
  25. 2022Quark: Controllable Text Generation with Reinforced Unlearningcited by 237
  26. 2020Learning from the Worst: Dynamically Generated Datasets to Improve Online Hate Detectioncited by 221
  27. 2016Ex Machina: Personal Attacks Seen at Scalecited by 209
  28. 2022BlenderBot 3: a deployed conversational agent that continually learns to responsibly engagecited by 198
  29. 2021Process for Adapting Language Models to Society (PALMS) with Values-Targeted Datasetscited by 181
  30. 2019The Second Conversational Intelligence Challenge (ConvAI2)cited by 179
  31. 2019Build it Break it Fix it for Dialogue Safety: Robustness from Adversarial Human Attackcited by 176
  32. 2022In-context Examples Selection for Machine Translationcited by 172
  33. 2020Recipes for Safety in Open-domain Chatbotscited by 170
  34. 2019Queens are Powerful too: Mitigating Gender Bias in Dialogue Generationcited by 152
  35. 2021RedditBias: A Real-World Resource for Bias Evaluation and Debiasing of Conversational Language Modelscited by 149
  36. 2017ParlAI: A Dialog Research Software Platformcited by 139
  37. 2020Can You Put it All Together: Evaluating Conversational Agents' Ability to Blend Skillscited by 131
  38. 2022ProsocialDialog: A Prosocial Backbone for Conversational Agentscited by 109

50 most cited of 65 All 65 (JSON)

Built on by

Cited by year (2026 to 13 Oct)

Citing papers per year: 2023: 13; 2024: 14; 2025: 9; 2026: 6.

42 papers.

Sort:

By area:

  1. 2023StarCoder: may the source be with you!cited by 797
  2. 2023Bias and Fairness in Large Language Models: A Surveycited by 636
  3. 2023In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steeringcited by 243
  4. 2023Domain Specialization as the Key to Make Large Language Models Disruptive: A Comprehensive Surveycited by 135
  5. 2024Bias and Unfairness in Information Retrieval Systems: New Challenges in the LLM Eracited by 98
  6. 2024Detoxifying Large Language Models via Knowledge Editingcited by 87
  7. 2023In-Context Learning with Iterative Demonstration Selectioncited by 74
  8. 2024Self-Debiasing Large Language Models: Zero-Shot Recognition and Reduction of Stereotypescited by 59
  9. 2025FairSteer: Inference Time Debiasing for LLMs with Dynamic Activation Steeringcited by 39
  10. 2024AI Safety in Generative AI Large Language Models: A Surveycited by 33
  11. 2023Beyond Task Performance: Evaluating and Reducing the Flaws of Large Multimodal Models with In-Context Learningcited by 30
  12. 2024Deconstructing The Ethics of Large Language Models from Long-standing Issues to New-emerging Dilemmas: A Surveycited by 23
30 more
  1. 2024High-Dimension Human Value Representation in Large Language Modelscited by 20
  2. 2023Building Trustworthy NeuroSymbolic AI Systems: Consistency, Reliability, Explainability, and Safetycited by 14
  3. 2023Fine-tune Language Models to Approximate Unbiased In-context Learningcited by 12
  4. 2023Tackling Bias in Pre-trained Language Models: Current Trends and Under-represented Societiescited by 11
  5. 2024Potential and Challenges of Model Editing for Social Debiasingcited by 10
  6. 2023Learn What NOT to Learn: Towards Generative Safety in Chatbotscited by 8
  7. 2023PlugMed: Improving Specificity in Patient-Centered Medical Dialogue Generation using In-Context Learningcited by 8
  8. 2024Should We Fine-Tune or RAG? Evaluating Different Techniques to Adapt LLMs for Dialoguecited by 7
  9. 2024SAIL: Sample-Centric In-Context Learning for Document Information Extractioncited by 6
  10. 2025BiasFilter: An Inference-Time Debiasing Framework for Large Language Modelscited by 6
  11. 2025TalkDep: Clinically Grounded LLM Personas for Conversation-Centric Depression Screeningcited by 6
  12. 2023JAB: Joint Adversarial Prompting and Belief Augmentationcited by 5
  13. 2023Beyond Output Matching: Bidirectional Alignment for Enhanced In-Context Learningcited by 5
  14. 2024Investigating Adversarial Trigger Transfer in Large Language Modelscited by 5
  15. 2025Adaptive Detoxification: Safeguarding General Capabilities of LLMs through Toxicity-Aware Knowledge Editingcited by 5
  16. 2024Synergizing In-context Learning with Hints for End-to-end Task-oriented Dialog Systemscited by 4
  17. 2024On LLM Wizards: Identifying Large Language Models' Behaviors for Wizard of Oz Experimentscited by 4
  18. 2025Thinking with Nothinking Calibration: A New In-Context Learning Paradigm in Reasoning Large Language Modelscited by 4
  19. 2025Understanding the Generalization of In-Context Learning in Transformers: An Empirical Studycited by 3
  20. 2026Mitigating the Safety-utility Trade-off in LLM Alignment via Adaptive Safe Context Learningcited by 2
  21. 2024Self-Supervised Position Debiasing for Large Language Modelscited by 1
  22. 2024GrounDial: Human-norm Grounded Safe Dialog Response Generationcited by 1
  23. 2026A Concise Agent is Less Expert: Revealing Side Effects of Using Style Features on Conversational Agentscited by 1
  24. 2026Learning to Select Visual In-Context Demonstrationscited by 1
  25. 2025From Measurement to Mitigation: Exploring the Transferability of Debiasing Approaches to Gender Bias in Maltese Language Modelscited by 0
  26. 2025Dialogue Systems Engineering: A Survey and Future Directionscited by 0
  27. 2025Comp-X: On Defining an Interactive Learned Image Compression Paradigm With Expert-driven LLM Agentcited by 0
  28. 2026RoTRAG: Rule of Thumb Reasoning for Conversation Harm Detection with Retrieval-Augmented Generationcited by 0
  29. 2026Detoxification for LLM: From Dataset Itselfcited by 0
  30. 2026RISA: Response Inspection and Selective Actions for Refusal Calibration in Large Language Modelscited by 0