Skip to content

xingbpshen/bayesian-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verbalized Probabilistic Graphical Modeling with Large Language Models

This repository contains the official implementation of the paper:

Verbalized Probabilistic Graphical Modeling with Large Language Models
Hengguan Huang, Xing Shen, Songtao Wang, Dianbo Liu, Hao Wang
arXiv Preprint, June 2024
Paper / BibTeX

Setup

  1. Install the required packages:
pip install -r requirements.txt
  1. Provide the OpenAI API key as an environment variable:
export OPENAI_API_KEY=your_openai_api_key

Run ScienceQA

  1. Run vPGM on ScienceQA dataset:
cd run_scienceqa
bash bash_run.sh
  1. After running the above command, you can find the results in the results/scienceqa_3568/ folder. Please note down the path of the results folder.
  2. In the run_scienceqa/dirichlet_hyperparam_test.py file, change the path variable to the path of the test cache file (e.g., path = "../results/scienceqa_3568/exp1_test_cache.json")
  3. Run BayesVPGM on ScienceQA dataset:
cd run_scienceqa
python dirichlet_hyperparam_test.py

Acknowledgement

This repository contains code adapted from repository chameleon-llm. We thank to the above repository's authors for their great work.

Citation

If you find this repository useful in your research, please cite our paper:

@article{huang2024verbalized,
  title={Verbalized Probabilistic Graphical Modeling with Large Language Models},
  author={Huang, Hengguan and Shen, Xing and Wang, Songtao and Liu, Dianbo and Wang, Hao},
  journal={arXiv preprint arXiv:2406.05516},
  year={2024}
}

About

The official implementation of the paper "Verbalized Probabilistic Graphical Modeling with Large Language Models".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors