Development of a GraphRAG-Based Automated Knowledge Graph Query Generation Model for Inference Search in BIM Data: A Case Study of a Rigid-Frame Bridge
최근 BIM은 단순 3차원 모델링을 넘어 표준화된 속성 데이터의 품질 확보와 체계적 관리가 핵심 요구로 부각되고 있으며, 온톨로 지 및 지식그래프 기반의 데이터 관리・추론 방식이 주목받고 있다. 그러나 지식그래프 기반 BIM 데이터는 부재 간 구조 관계 분석, 설 계 검토, 물량・속성 정보 조회 등 실무 의사결정을 지원할 수 있으나, SPARQL・Cypher와 같은 그래프 질의어를 직접 작성해야 한다 는 점에서 실무 적용에 제약으로 작용한다. 이를 위해 본 연구에서는 사용자가 자연어 질문을 기반으로 그래프 질의를 자동 생성할 수 있는 GraphRAG 기반 질의 자동 생성 프레임워크를 제안하였다. 먼저 CSV 기반 속성/관계 테이블에 규칙을 적용해 노드・관계를 생 성하고 그래프 데이터베이스에 적재하는 CSV-to-LPG 파이프라인을 구현하여, LPG 지식그래프 구축 절차를 자동화하였다. 이후 Few-shot Learning 기반 프롬프트 설계를 통해 사용자의 자연어 질문을 Cypher 쿼리로 자동 변환하는 자동 질의 생성 모듈을 구현하 였다. 전체 프레임워크는 Graph-ACQ 시스템으로 개발하여 라멘교 BIM 데이터를 기반으로 적용하였다. 검증 결과 LPG 스키마 유효 성과 Cypher 자동 생성, Cypher 질의 수작업 과정에서 정확도 모두 100%를 달성하였고, 질의 생성 시간은 평균 7.1초에 처리되었다. GraphRAG 기반 질의 생성 방식은 부재 간 공간・구조 관계를 명시적으로 활용하므로, 설계・검토 과정에서 요구되는 연결 관계 분석, 구조 구성 파악, 물량・속성 정보 조회 등 관계 기반 질의를 자연어로 수행할 수 있다. 또한 Few-shot Learning 기반 접근을 적용하여 교 량 뿐만 아니라 다양한 공종 내에서도 질의 생성을 가능하게 함으로써, 프로젝트의 확장성을 확보 가능하다.
Recently, Building Information Modeling (BIM) has evolved beyond three-dimensional modeling, increasingly focusing on the quality of standardized attribute data and systematic data management. Accordingly, ontology- and knowledge-graph–based data representation and reasoning approaches have increasingly gained attention. Knowledge-graph–based BIM data can support practical tasks such as structural relationship analysis, design review, and quantity and attribute information retrieval. However, practical adoption is limited by the need to manually write graph query languages, such as SPARQL and Cypher, which requires detailed knowledge of graph schemas and query syntax. To address this limitation, a GraphRAG-based automated query generation framework that converts natural-language questions into graph queries is proposed. A CSV-to-Labeled Property Graph (LPG) pipeline is developed to automate graph construction by generating nodes and relationships from rule-based attribute and relationship tables derived from bridge BIM data. In addition, a few-shot learning–based prompt design is utilized to generate Cypher queries from natural-language inputs automatically. The proposed framework is implemented as the Graph-ACQ system and validated using rigid-frame bridge BIM data. Experimental results demonstrate 100% accuracy in schema validity and query generation, with an average processing time of 7.1s. The proposed approach enables intuitive, relationship-oriented BIM data querying and supports scalable application across diverse infrastructure domains.