The goal of this project is to develop a robust, automated pipeline for extracting detailed electrolyte composition data from the full text of millions of scientific journal articles published over the past two decades. Our focus is on electrolytes relevant to electrochemical applications such as energy storage and conversion. By employing large language models (LLMs) and named entity recognition (NER) techniques, we aim to build an open-access, structured database linking electrolyte compositions to key electrochemical properties.
python-dotenv
openai==1.76.0
pandas==2.2.3
numpy==2.2.4
black
beautifulsoup4==4.13.4
grobid-client-python
docling
pytest==8.4.1
google-genai==1.4.0git clone https://github.com/manojCoe/BatteryExtractLLM
cd BatteryExtractLLMpython -m venv venv
venv/Scripts/activatepip install -r requirements.txtCheckout GROBID-Based PDF-to-JSON Conversion Pipeline for instrcutions on how to convert your pdf to s2orc json format
We currently support GPT, Gemini and LLAMA models
- For OpenAI model,
Replace API_KEY in .env file with your OpenAI api_key and save- For Gemini model,
Replace GEMINI_API_KEY in .env file with your Gemini api_key and save- For LLama models, basic config with API key is already prefilled.
"--model", choices=["gpt", "llama", "gemini"], required=False, help="Which model to use (gpt, llama)", default='gpt')
"--mode", choices=["model", "section", "image"], required=False, default="model", help="Which mode to run (text model, section-wise, image)")
"--path", type=Path, required=False, help="Path to file or folder containing input(s)")
"--batch", action="store_true", help="Process pdfs in batches and query all pdfs within the folder - /input_pdfs.",For Single pdf query
python .\src\main.py --path <s2orc json_file_path>For batch pdf querying
python .\src\main.py --batch- For macos, any errors related to numpy < 2 required, set numpy==1.26.4 in requirements.txt and run
pip install -r requirements.txt
Create a virtual environment if you have many versions of python or python dependencies on your system. This repo requires python >= 3.10