MatSciLLM is primarly an LLM-based application designed for material science research, enabling content extraction and analysis from PDFs along with access to the Materials Project Database.
-
User Interface - User-friendly chat interface with convenient PDF management.
-
Specific Question - Extracts the most relevant content from all uploaded PDFs based on a provided query.
-
Every PDF - Provides answers to the query for each PDF individually.
-
Database Access - Retrieves all unique stable element combinations for a given material from Materials Project (expandable).
This repository includes Makefile for easy installation.
Prerequisite
-
Clone Repository
git clone https://github.com/xandaaaa/MatSciLLM.git cd MatSciLLM -
Add API Key
Insert your Materials Project API key into the.env.examplefile. This key is required for accessing the Materials Project API. -
Create
.envFile
Copy.env.exampleto.envto set up environment variables.cp .env.example .env
-
Install dependencies
Use the provided Makefile to install dependencies.Note: For Python, it’s recommended to create and activate a virtual environment before running this.
make install
-
Run application
Start the application using the Makefile, then open the application at the specified localhost address.make run
Notes:
- To stop the application, press
Ctrl + Cin the terminal.- The default LLM model is
llama3:latest.- Alternatively, you can use a different LLM model by changing the
model_nameparameter in the following functions:
backend/dbMP.py→llm_extract_element(model_name=...)backend/rag_chain.py→build_rag_chain(model_name=...)backend/rag_summarizer.py→build_rag_summarizer(model_name=...)
