Skip to content

xandaaaa/MatSciLLM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MatSciLLM

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.

MatSciLLM interface

Features

  • 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).

Setup

This repository includes Makefile for easy installation.

Prerequisite

  1. Clone Repository

    git clone https://github.com/xandaaaa/MatSciLLM.git
    cd MatSciLLM
  2. Add API Key
    Insert your Materials Project API key into the .env.example file. This key is required for accessing the Materials Project API.

  3. Create .env File
    Copy .env.example to .env to set up environment variables.

    cp .env.example .env
  4. 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
  5. 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 + C in the terminal.
  • The default LLM model is llama3:latest.
  • Alternatively, you can use a different LLM model by changing the model_name parameter in the following functions:
    • backend/dbMP.pyllm_extract_element(model_name=...)
    • backend/rag_chain.pybuild_rag_chain(model_name=...)
    • backend/rag_summarizer.pybuild_rag_summarizer(model_name=...)

About

local LLM-based content extraction tool for material sciences.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors