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.
This repository contains:
llm_regressor.py: Prompt templates and aLLMRegressorclass.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.
Create a Python environment and install the required dependencies:
pip install -r requirements.txtSet 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_hereThis 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.
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.