This is BIM LLM Code Agent for the purpose of checking LLM Agent Performance as the viewpoint of complicated model like IFC and publishing paper. It is an open-source project that combines Building Information Modeling (BIM) with large language models (LLMs) to handle queries and automate tasks involving BIM files, IFC files. This tool streamlines reasoning, code generation, and analysis for BIM professionals, making it easier to interact with complex IFC BIM. This project is not perfect. Sometimes, it has hallucinations and sometimes it generates incomplete code. This requires more formal RAG handling and LLM usage.
- BIM Query Handling: Processes natural language queries to extract or analyze BIM data.
- Code Generation: Automatically generates Python scripts to fulfill user commands.
- File Compatibility: Supports multiple file formats, including IFC, PDF, JSON, TXT, and CSV.
- Interactive Web Interface: Provides a user-friendly interface using Streamlit.
- Visualization and Reporting: Generates tables, charts, and summaries based on user requests.
- Python 3.8 or later
- An OpenAI API key
- Optional: API keys for LangChain and Tavily for additional features
-
Clone the Repository
Clone the project to your local system:git clone https://github.com/mac999/BIM_LLM_code_agent.git cd bim-llm-code-agent
-
Install Required Libraries
Manually install the necessary Python libraries:pip install matplotlib pandas pyvista plotly langchain-openai langchain-core langchain-community streamlit ifcopenshell
-
Set Up Environment Variables
Create a.env
file in the project directory and configure it with your API keys:OPENAI_API_KEY=<your_openai_api_key> LANGCHAIN_API_KEY=<your_langchain_api_key> LANGCHAIN_PROJECT=AGENT_TUTORIAL TAVILY_API_KEY=<your_tavily_api_key> HF_TOKEN=<your_hf_token>
-
Run the Application
Launch the Streamlit application:streamlit run bim_code_agent_app.py
-
Access the App
Open your browser and navigate tohttp://localhost:8501
to start interacting with the BIM LLM Code Agent.
-
Query:
"Print the number of rooms whose names start with 'A'." Output: A table summarizing the count of the rooms. -
Query:
"'A'이름으로 시작하는 방을 표 형식으로 리스트해줘. 각 방의 이름, 면적 속성도 같이 표 형식으로 출력해." Output: A table summarizing the room names and areas. -
Query:
"'A'이름으로 시작하는 방을 표 형식으로 리스트해줘. 각 방의 이름, 면적, 속성, 부피도 같이 표 형식으로 출력해. 차트는 각 방의 이름에 대한 면적, 부피를 3차원 차트로 표시해줘야 해. 차트에 표시되는 각 데이터 포인트는 부피에 따라 색상이나 크기가 달라져야 해."
Output: A 3D Plotly chart displaying room data and the corresponding Python script.
bim_code_agent.py
: Core functionality for managing BIM queries and generating Python code.bim_code_agent_app.py
: Streamlit-based web application to interact with the BIM agent..env
: Configuration file for API keys and environment variables.
- Multi-Agent System: Employs LangChain to integrate LLMs, memory, vector stores, and more.
- File Handling: Automatically processes uploaded files for vectorized searches or BIM analysis.
- Custom Chain: A specialized LangChain pipeline for BIM-related queries.
Contributions are welcome! To contribute:
- Fork this repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a clear explanation of your changes.
This project is licensed under the MIT License. See the LICENSE
file for details.
- Taewook Kang
Email: [email protected]
- LangChain
- IfcOpenShell
- Streamlit
- BIM Knowledge Expert Agent Research Based on LLM and RAG
- Is Langchain really pointless?
This README provides an accessible, clear explanation of the project and its usage. Let me know if you'd like to make further changes!