Skip to content
/ EoP Public

Official Repo for Exchange of Perspective Prompting Enhances Reasoning in Large Language Models

Notifications You must be signed in to change notification settings

sunlin-ai/EoP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Official Repo of Exchange of Perspective (EoP)

License

image-20240927143056918

Official implementation for paper Exchange of Perspective Prompting Enhances Reasoning in Large Language Models with code, prompts, model outputs.

Installation

pip install jsonlines
pip install openai
pip install jinja2

Usage

The code needs to be configured with your account' secret key. Set api_key and azure_endpoint to its value:

api_key = "Put Your Key Here"
azure_endpoint ="Put Your azure_endpoint url"

Run

We run the main with the following:

python main.py --prompt_dir [base prompt] --eng [openAI model] --seed [seed number] --hint [PHP prompt] --dataset [datasetname] --num_test -1 --q1 [ori: standard or CoT, complex: complex CoT] --q2 [ori: standard or CoT, complex: complex CoT] --sample [sample number] --temp [0.0 for greedy, 0.7 for sc]

Or, we can just use the file in bash directory:

bash scripts/cot.sh

Citation

If you find this work useful, please cite our paper:

@misc{sun2025exchangeperspectivepromptingenhances,
      title={Exchange of Perspective Prompting Enhances Reasoning in Large Language Models}, 
      author={Lin Sun and Can Zhang},
      year={2025},
      eprint={2506.03573},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2506.03573}, 
}

About

Official Repo for Exchange of Perspective Prompting Enhances Reasoning in Large Language Models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published