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
- Install the required packages:
pip install -r requirements.txt- Provide the OpenAI API key as an environment variable:
export OPENAI_API_KEY=your_openai_api_key- Run vPGM on ScienceQA dataset:
cd run_scienceqa
bash bash_run.sh- 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. - In the
run_scienceqa/dirichlet_hyperparam_test.pyfile, change thepathvariable to the path of the test cache file (e.g.,path = "../results/scienceqa_3568/exp1_test_cache.json") - Run BayesVPGM on ScienceQA dataset:
cd run_scienceqa
python dirichlet_hyperparam_test.pyThis repository contains code adapted from repository chameleon-llm. We thank to the above repository's authors for their great work.
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}
}