[ChatBattery] Expert-Guided LLM Reasoning for Battery Discovery: From AI-Driven Hypothesis to Synthesis and Characterization
Authors: Shengchao Liu*, Hannan Xu*, Yan Ai*, Huanxin Li+, Yoshua Bengio+, Harry Guo+
conda create -n ChatBattery python=3.9
conda activate ChatBattery
pip install pandas
pip install openai==0.28
pip install Levenshtein
pip install pymatgen==2024.4.13
pip install ase
pip install scikit-learn
pip install xgboost
pip install mp-api==0.41.2
pip install Flask
pip install -e .
In our case, we download all the chemical formula including Lithium from ICSDN. Then after preprocessing, the file is data/Li_battery/preprocessed.csv.
You need to set up two keys:
- First set the OpenAI API key, type this in terminal
export OPENAI_API_KEY=xxxxx. - Then is the MP API key, you can change it in the file
ChatBattery/search_agentand resetMP_api_key = 'xxx'.
For stage 1 to 4, run this CMD in terminal
python main.pyThe default address is 127.0.0.1:5000. Simply open this address in your browser, and you will see the interface displayed like this:
Then please follow the instructions from stage 1 to stage 4. Enter Ctrl + C if you want to stop the program.
The results are collected into a csv file, which will be fed into the next stage.
- Stage 5, first please get prepared the input file
cd stage_05_deduplication
python stage_05_deduplication.py --input_file=xxx- Stage 6, then run the following CMD
cd stage_06_ranking
bash stage_06_ranking.sh