Skip to main content

[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+

1 Environment Setup

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 .

2 Data Preprocess

In our case, we download all the chemical formula including Lithium from ICSDN. Then after preprocessing, the file is data/Li_battery/preprocessed.csv.

3 Run Scripts

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_agent and reset MP_api_key = 'xxx'.

3.1 Exploration Phase

For stage 1 to 4, run this CMD in terminal

python main.py

The 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.

3.2 Exploitation Phase
  • 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

Metadata

Release files for ChatBattery 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ChatBattery 0.1.0
File Size Uploaded
chatbattery-0.1.0.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ChatBattery 0.1.0
File Interpreter ABI Platform
chatbattery-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.6 kB

Release files / chatbattery-0.1.0.tar.gz

Download URL chatbattery-0.1.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
705a72f4b9df03410cdfcc865a39b507fed8e962c441d8d426aca4641706b235
BLAKE2b-256 checksum
How to use checksums
2b4852e58ef02fdad3fe8ebd7d5fdad52f70ed2d54572738606f5f9d060dfb8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release files / chatbattery-0.1.0-py3-none-any.whl

Download URL chatbattery-0.1.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6eaf21d0cc3a1d787f11714424fb1175bab9c62dc75aac2fccb4239a8acf90df
BLAKE2b-256 checksum
How to use checksums
cc3d1a0f10a1166aa5beff8f6039d2bb8bbf3eeff5c38d6157d4f48c3c405161
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page