Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LLM4ConProp

Python Version LangChain

LLM4ConProp is a proof-of-concept project that explores the use of large language models (LLMs) as prompt-based regressors for concrete materials property prediction. The demo constructs zero-shot, few-shot, and domain-knowledge-augmented prompts, calls a chat model through LangChain, and parses the model response into numerical predictions of concrete compressive strength.

What Is Included

This repository contains:

  • llm_regressor.py: Prompt templates and a LLMRegressor class.
  • demo.ipynb: A demonstration notebook for zero-shot, few-shot, and few-shot-with-domain-knowledge prediction.
  • requirements.txt: Python dependencies required to run the demo.

The main prompt templates are:

  • regression_prompt: Asks the LLM to predict a target material property.
  • example_prompt: Formats labeled training examples for few-shot prompting.
  • knowledge_prompt: Adds fuzzy domain knowledge to support prediction.

Setup

Create a Python environment and install the required dependencies:

pip install -r requirements.txt

Set your model provider API key before running the examples. For the OpenAI-compatible example below, set OPENAI_API_KEY. On Windows PowerShell:

$env:OPENAI_API_KEY = "your_api_key_here"

On macOS/Linux:

export OPENAI_API_KEY=your_api_key_here

Notes

This repository is intended as a proof of concept rather than a fully validated materials model. The predictions should be treated as prompt-based estimates and should be carefully evaluated against curated experimental data before any scientific or engineering use.

Acknowledgment

This project was developed during the 2025 LLM Hackathon for Applications in Materials Science and Chemistry, held on September 11-12, 2025. Model access during the development of this project was supported by the OpenAI Researcher Access Program.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages