The code implementation for "Dynamic In-Context Learning from Nearest Neighbors for Bundle Generation"
This project contains the code implementation for the experiments presented in the paper titled "Dynamic In-Context Learning from Nearest Neighbors for Bundle Generation". The purpose of this code is to reproduce the experiments and results mentioned in the paper. Users are required to replace the OpenAI API key with their own key to execute the code successfully.
- Python (version >= 3.8)
- OpenAI/Claude API key
-
Download this project to your local machine.
-
Navigate to the project directory:
cd DICL
- Install the required Python packages:
pip install -r requirements.txt
Open the config.yaml
file and replace the placeholder for the OpenAI/Claude API key with your own key:
api_key: 'your_own_key_here'
Execute the following command to run the experiment script. Replace --dataset with the desired dataset name (e.g., 'electronic'):
python run.py --dataset electronic
This command will initiate the experiment, and the results for each step will be saved in the temp/
folder.
This project is licensed under the MIT License - see the LICENSE file for details.