This repository hosts the code for the paper: Approaching Human-Level Forecasting with Language Models.
Our system is designed to make automated, simulated forecasts by following these steps:
We've designed our system to be easily scalable to other news APIs and language models.
This guide will help you set up your development environment for the project. Make sure you follow these steps under the root directory of the project (where pyproject.toml is located).
Miniconda or Anaconda: Ensure you have Miniconda or Anaconda installed as they include the Conda package manager.
Create and Activate a Conda Environment
Start by creating a Conda environment specifically for this project.
conda create -n myenv python=3.11
conda activate myenv
Replace myenv with your preferred environment name and adjust python=3.11 if needed.
Install Setuptools and Upgrade Build
Within your Conda environment:
conda install setuptools
pip install --upgrade build
Install Package in Editable Mode
Install the package in editable mode to allow changes in your code to be immediately reflected in the installed package. This also installs all dependencies listed in project.toml
.
pip install --editable .
Once the setup is complete, you can start using the package. For example, you can import modules from the forecasting subdirectory as follows:
import information_retrieval
import utils
from prompts.prompts import prompt_dict
When you're finished working, you can deactivate the Conda environment:
conda deactivate
See the system_demo for an example on how to run our system.
The cleaned and formatted dataset can be found on huggingface, as well as the raw dataset.
We welcome contributions to this repository. If you'd like to contribute, please follow these steps:
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
Please ensure that your code adheres to the project's coding conventions and that you include tests for any new functionality or bug fixes.
If our codebase, dataset, or paper proves fruitful for your work, please consider citing us.
@misc{halawi2024approaching,
title={Approaching Human-Level Forecasting with Language Models},
author={Danny Halawi and Fred Zhang and Chen Yueh-Han and Jacob Steinhardt},
year={2024},
eprint={2402.18563},
archivePrefix={arXiv},
primaryClass={cs.LG}
}