Reproduce “Personality-Guided Code Generation Using Large Language Models” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Yaoqi Guo, Zhenpeng Chen, Jie M. Zhang, Yang Liu, Yun Ma

Researchers from Peking University, Nanyang Technological University, and King's College London introduced a personality-guided approach for Large Language Models, assigning task-appropriate MBTI personality traits to enhance code generation accuracy. This method achieved pass rate improvements of up to 12.9% for specific LLMs and datasets, demonstrating the value of human-centric cognitive alignment in AI agents.

Key insights

  • LLMs with moderate baseline performance and datasets of moderate difficulty benefited most from personality guidance, while very strong or very weak models showed limited gains.
  • Detailed, task-specific personality descriptions are crucial for effectiveness; using full MBTI descriptions and dynamically generated descriptions significantly outperformed short types or static templates.
  • The MBTI personality framework proved more effective than the Big Five model for guiding code generation, likely due to its structured alignment with cognitive preferences relevant to programming tasks.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.