[논문 리뷰] SyntheT2C: Generating Synthetic Data for Fine-Tuning Large Language Models on the Text2Cypher Task
SyntheT2C는 Neo4j용 Query-Cypher 쌍을 생성하기 위해 두 개의 합성 데이터 파이프라인을 만들며, Text2Cypher에서 LLM을 효과적으로 미세조정하도록 한다. 데이터의 유효성을 검사하고 확장하여 Cypher 작성 성능을 향상시킨다.
Integrating Large Language Models (LLMs) with existing Knowledge Graph (KG) databases presents a promising avenue for enhancing LLMs' efficacy and mitigating their "hallucinations". Given that most KGs reside in graph databases accessible solely through specialized query languages (e.g., Cypher), it is critical to connect LLMs with KG databases by automating the translation of natural language into Cypher queries (termed as "Text2Cypher" task). Prior efforts tried to bolster LLMs' proficiency in Cypher generation through Supervised Fine-Tuning (SFT). However, these explorations are hindered by the lack of annotated datasets of Query-Cypher pairs, resulting from the labor-intensive and domain-specific nature of such annotation. In this study, we propose SyntheT2C, a methodology for constructing a synthetic Query-Cypher pair dataset, comprising two distinct pipelines: (1) LLM-based prompting and (2) template-filling. SyntheT2C is applied to two medical KG databases, culminating in the creation of a synthetic dataset, MedT2C. Comprehensive experiments demonstrate that the MedT2C dataset effectively enhances the performance of backbone LLMs on Text2Cypher task via SFT. Both the SyntheT2C codebase and the MedT2C dataset are released in https://github.com/ZGChung/SyntheT2C.
연구 동기 및 목표
- Neo4j 데이터베이스의 자연어와 Cypher 쿼리 간의 격차를 해소한다.
- 수동 주석 없이 고품질의 합성 Question-Cypher 쌍을 생성한다.
- 실행 가능한 Cypher 쿼리를 작성하도록 백본 LLM을 효과적으로 미세조정할 수 있게 한다.
- Text2Cypher 연구를 지원하는 검증 도구와 데이터세트를 제공한다.
제안 방법
- 두 가지 보완적 파이프라인이 합성 QCy 쌍을 생성한다: (i) 의사소통 기반 프롬팅으로 의미적으로 다양하게 Cypher를 생성, (ii) 템플릿 채우기로 구문적으로 복잡한 Cypher를 생산.
- 실행 가능한 Cypher 생성을 보장하기 위한 데이터베이스 메타데이터 추출 및 스키마 바운딩.
- 자동 검증기(문법적, 의미론적, 엔터티, 스키마, 일관성)가 수동 검증 전에 Cypher를 선별한다.
- 다중 합의 투표를 통한 수동 검증으로 고품질의 ground-truth 데이터를 보장한다.
- MedT2C를 사용하여 두 개의 Neo4j 의료 데이터베이스(LHY 및 Hetionet)에서 LoRA로 백본 LLM을 미세조정한다.
실험 결과
연구 질문
- RQ1SyntheT2C가 생성한 합성 Query-Cypher 쌍이 LLM이 실행 가능한 Cypher 쿼리를 생성하도록 효과적으로 학습시킬 수 있는가?
- RQ2두 개의 합성 데이터 파이프라인이 Cypher 작성 성능 향상에서 어떻게 서로를 보완하는가?
- RQ3데이터 검증(자동 및 수동)이 생성된 Cypher의 품질 및 실행 정확도에 미치는 영향은 무엇인가?
- RQ4합성 데이터 세트의 확장이 Cypher 품질 및 실행 정확도에 어떤 영향을 미치는가?
- RQ5MedT2C 데이터세트가 Text2Cypher에서 서로 다른 LLM 계열(open 및 closed)을 미세조정하는 데 효과적인가?
주요 결과
- MedT2C는 미세조정 후 여러 백본 LLM에서 Cypher 작성 품질을 향상시킨다.
- 두 파이프라인을 결합하면 단일 파이프라인을 사용할 때보다 전반적으로 최상의 성능을 낸다.
- 다섯 가지 검증기가 함께 작동할 때 절차 제거 분석에서 Cypher 품질 및 실행 정확도에 가장 큰 이점을 제공한다.
- 확장 결과는 MedT2C와 유사한 데이터세트 크기까지 성능이 향상되며, 그 이후에는 수익이 감소한다.
- 템플릿 기반 데이터만으로는 프롬팅의 보완적 의미 데이터가 없이 사용될 경우 성능 저하를 유발한다.
- MedT2C 데이터세트(LHY와 Hetionet에서 생성된 합성 데이터)는 LLM이 사람 주석 Cypher의 품질에 근접하거나 이를 능가하도록 한다.
더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.