SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.07702 · 2023

Better Zero-Shot Reasoning with Role-Play Prompting

arXiv · PDF · Open in the Atlas

Code that ran

1 of 3 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2308.07702.json · badge: /api/ran/2308.07702.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
nku-hlt/role-play-prompting canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
HLT-NLP/Role-Play-Prompting canonical (classifier label)
classifier basis: census
0 ran · 2 no recorded run
FunctionStatusWhere it lives
shuffleDict Ran
ran; our contract draft was wrong, not the code
nku-hlt/role-play-prompting/utils.py
pointer only (licence: NONE) · get_code("ae2495a11361cc1d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, nku-hlt/role-play-prompting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

decoder_for_gpt3 Not yet run
unverified (harvested, no recorded run)
HLT-NLP/Role-Play-Prompting/utils.py
pointer only (licence: NONE) · get_code("41e032ffe51df9f6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, HLT-NLP/Role-Play-Prompting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

print_now Not yet run
unverified (harvested, no recorded run)
HLT-NLP/Role-Play-Prompting/utils.py
pointer only (licence: NONE); the stored copy get_code serves, from wjn1996/Chain-of-Knowledge, is pointer only (licence: NONE) · get_code("28145bbcf1d4f9ea")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, HLT-NLP/Role-Play-Prompting when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 1 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
print_now 10 other papers
2 dated earlier, 8 later
2210.03493 (2022-10)
Automatic Chain of Thought Prompting in Large Language Models
2305.13269 (2023-05)
Chain-of-Knowledge: Grounding Large Language Models via Dynamic Knowledge Adapting over Heterogeneous Sources
2310.01446 (2023-10)
Adaptive-Solver Framework for Dynamic Strategy Selection in Large Language Model Reasoning
and 7 more not named here
shuffleDict 5 other papers
1 dated earlier, 4 later
2210.03493 (2022-10)
Automatic Chain of Thought Prompting in Large Language Models
2024.emnlp-main.758 (2024 (year only))
Fewer is More: Boosting Math Reasoning with Reinforced Context Pruning
2401.04925 (2024-01)
The Impact of Reasoning Step Length on Large Language Models
and 2 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Modern large language models (LLMs) exhibit a remarkable capacity for role-playing, enabling them to embody not only human characters but also non-human entities. This versatility allows them to simulate complex human-like interactions and behaviors within various contexts, as well as to emulate specific objects or systems. While these capabilities have enhanced user engagement and introduced novel modes of interaction, the influence of role-playing on LLMs' reasoning abilities remains underexplored. In this study, we introduce a strategically designed role-play prompting methodology and assess its performance under the zero-shot setting across twelve diverse reasoning benchmarks. Our empirical results illustrate that role-play prompting consistently surpasses the standard zero-shot approach across most datasets. Notably, in experiments conducted using ChatGPT, accuracy on AQuA rises from 53.5% to 63.8%, and on Last Letter from 23.8% to 84.2%.Upon further comparison with the Zero-Shot-CoT technique, which prompts the model to "think step by step", our study demonstrates that role-play prompting acts as a more effective trigger for the CoT process. This highlights its potential to augment the reasoning capabilities of LLMs. We release our code at https://github.com/NKU-HLT/Role-Play-Prompting.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2308.07702")
get_code_for_paper("2308.07702")
have("2308.07702")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2308.07702.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2308.07702.svg)](https://syntology.ai/paper/2308.07702)

Connect an agent — have() is free.