Skip to content

yoongja/ABS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[PAKDD 2026] Adaptive Beam Search with Shannon Entropy for Data-centric Reasoning in LLMs

Python 3.8 OpenAI LLaMA

Welcome to the Adaptive Beam Search repository! This repo is official code for " Adaptive Beam Search with Shannon Entropy for Data-centric Reasoning in LLMs" , PAKDD 2026 by Yoonji Kim, Yujin Jeong, Jieun Kim.

This repository supports running adaptive beam search on a variety of reasoning tasks across multiple models and prompting strategies.


📋 Prompt Overview

  • CoT: Chain-of-Thought
  • ToT: Tree-of-Thoughts

Arithmetic Reasoning

Symbolic Reasoning

  • Date Understanding: CoT

Commonsense Reasoning

Algorithmic Reasoning

  • Game of 24: ToT

🛠️ How to Use

1. Clone the Repository

git clone https://github.com/yoongja/ABS.git
cd ABS

2. Install Requirements

pip install -r requirements.txt

3. Prepare Environment Variables

Create a .env file in the project root and add the necessary variables:

# For using OpenAI models like GPT-4
OPENAI_API_KEY="your-openai-api-key"

4. Prepare the Data

Create a data/ directory in the project root and place the dataset files inside:

data/
├── gsm8k.json
├── aqua.json
├── date_understanding.json
├── csqa.json
├── strategyqa.json
└── game_of_24.json

🚀 Running Experiments

GPT (OpenAI)

Navigate to the GPT directory and run:

cd adaptive_beam_search/gpt/
bash scripts/run_gsm8k.sh

LLaMA

Navigate to the LLaMA directory and run:

cd adaptive_beam_search/llama/
bash scripts/run_gsm8k.sh

About

Entropy-guided adaptive beam search for multi-step reasoning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors