simpleIfcAIAgentWithGraphRAG is a minimalistic project designed to showcase a simple AI agent that extracts data from an IFC file stored in a graph database (Neo4j). The project demonstrates the integration of AI, IFC file processing, and graph-based data storage and retrieval using modern tools such as Neo4j, LangGraph, and Azure GPT.
The project consists of two primary scripts:
ifc_to_neo4j.py: Parses an IFC file and stores its data in a Neo4j graph database. It organizes IFC entities as graph nodes and their relationships as graph edges.chatbot.py: Implements an AI agent that answers queries about the IFC file by executing Cypher queries on the Neo4j database.
This project is modular and can be adapted to other databases or in-memory graph representations with minor adjustments.
- Install Neo4j Desktop to set up a local Neo4j database.
- Deploy a ChatGPT model instance via Azure OpenAI Service.
-
Set up the Neo4j project:
- Open Neo4j Desktop and create a new project.
- Note the connection details (URI, username, password).
-
Run the project:
-
Clone this repository:
git clone https://github.com/your-username/simpleIfcAIAgentWithGraphRAG.git cd simpleIfcAIAgentWithGraphRAG -
Create a virtual environment and install dependencies:
python -m venv venv venv\Scripts\activate # On Linux/Mac: source venv/bin/activate pip install -r requirements.txt
-
Update the configuration in
main.py:- Set
neo4j_uri,neo4j_user, andneo4j_passwordto your Neo4j instance details. - Set
ifc_file_pathto the path of your IFC file. - Adjust
database_nameas needed.
- Set
-
Run the application:
python main.py
-
-
Interact with the chatbot:
- The chatbot will launch in a terminal-based interactive mode.
- Type your query, and the chatbot will translate it into a database query and return the results.
- To exit, type
exit,quit, orbye.
-
(Optional) Inspect your Ifc database in neo4j desktop
- Works well only with smaller ifc file, might take ages to upload bigger ifc files to the database
- LLM Context window limits are easy to achieve - depends on the questions (a solution for this problem is demonstrated here: https://www.linkedin.com/posts/dmytro-vakulenko-b2a86040_innovation-ifc-ai-agent-variables-activity-7285951367746080768-hRED/ )
This project is licensed under the MIT License. You are free to use, modify, and distribute this project as per the terms of the license.

