EMNLP 2024finding2 citations

Socratic Human Feedback (SoHF): Expert Steering Strategies for LLM Code Generation

Subramanian Chidambaram, Li Erran Li, Min Bai, Xiaopeng Li, Kaixiang Lin, Xiong Zhou, Alex C. Williams

Abstract

Large Language Models (LLMs) are increasingly used for generating code solutions, empowered by features like self-debugging and self-reflection. However, LLMs often struggle with complex programming problems without human guidance. This paper investigates the strategies employed by expert programmers to steer code-generating LLMs toward successful outcomes. Through a study involving experts using natural language to guide GPT-4, Gemini Ultra, and, Claude 3.5 Sonnet on highly difficult programming challenges, we frame our analysis using the “Socratic Feedback” paradigm for understanding effective steering strategies. By analyzing 30 conversational transcripts across all three models, we map observed feedback strategies to five stages of Socratic Questioning: Definition, Elenhus, Maieutic, Dialectic, and Counter-factual reasoning. We find evidence that by employing a combination of different Socratic feedback strategies across multiple turns, programmers successfully guided the models to solve 74% of the problems that the models initially failed to solve on their own.

BibTeX
@inproceedings{chidambaram-etal-2024-socratic,
    title = "Socratic Human Feedback ({S}o{HF}): Expert Steering Strategies for {LLM} Code Generation",
    author = "Chidambaram, Subramanian  and
      Li, Li Erran  and
      Bai, Min  and
      Li, Xiaopeng  and
      Lin, Kaixiang  and
      Zhou, Xiong  and
      Williams, Alex C.",
    editor = "Al-Onaizan, Yaser  and
      Bansal, Mohit  and
      Chen, Yun-Nung",
    booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2024",
    month = nov,
    year = "2024",
    address = "Miami, Florida, USA",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.findings-emnlp.908/",
    doi = "10.18653/v1/2024.findings-emnlp.908",
    pages = "15491--15502"
}