Aligning Large Language Models to a Domain-specific Graph Database for NL2GQL

要約

グラフ データベース (Graph DB) は、金融、ソーシャル ネットワーク、医療などのさまざまな領域にわたって広範囲に応用されています。
しかし、自然言語 (NL) からグラフ クエリ言語 (GQL) への翻訳 (NL2GQL と呼ばれます) は、その複雑で特殊な性質により大きな課題を引き起こします。
一部のアプローチでは、text2SQL などの類似タスクに対処するために大規模言語モデル (LLM) を利用しようとしています。
それにもかかわらず、特定のドメインに合わせて調整された NL2GQL タスクの領域では、ドメイン固有の NL-GQL データ ペアが存在しないため、LLM とグラフ DB の調整がさらに複雑になります。
この課題に取り組むために、私たちは明確に定義されたパイプラインを提示します。
最初に、ChatGPT を利用して NL-GQL データ ペアを生成し、提供された自己指示付きグラフ DB を活用します。
その後、生成されたデータを使用して LLM を微調整し、LLM とグラフ DB 間の整合を確保します。
さらに、正確な GQL を効率的に生成するには、関連するスキーマが重要であることがわかりました。
そこで、入力コンテキストとして関連するスキーマを抽出する方法を導入します。
私たちは、金融および医療ドメインのグラフ DB から派生した、FinGQL と MediGQL という名前の 2 つの慎重に構築されたデータセットを使用してメソッドを評価します。
実験結果から、私たちのアプローチは一連のベースライン手法を大幅に上回っており、FinGQL と MediGQL でそれぞれ EM で 5.90 絶対ポイントと 6.36 絶対ポイント、EX で 6.00 と 7.09 絶対ポイントの改善が見られます。

要約(オリジナル)

Graph Databases (Graph DB) find extensive application across diverse domains such as finance, social networks, and medicine. Yet, the translation of Natural Language (NL) into the Graph Query Language (GQL), referred to as NL2GQL, poses significant challenges owing to its intricate and specialized nature. Some approaches have sought to utilize Large Language Models (LLMs) to address analogous tasks like text2SQL. Nonetheless, in the realm of NL2GQL tasks tailored to a particular domain, the absence of domain-specific NL-GQL data pairs adds complexity to aligning LLMs with the graph DB. To tackle this challenge, we present a well-defined pipeline. Initially, we utilize ChatGPT to generate NL-GQL data pairs, leveraging the provided graph DB with self-instruction. Subsequently, we employ the generated data to fine-tune LLMs, ensuring alignment between LLMs and the graph DB. Moreover, we find the importance of relevant schema in efficiently generating accurate GQLs. Thus, we introduce a method to extract relevant schema as the input context. We evaluate our method using two carefully constructed datasets derived from graph DBs in the finance and medicine domains, named FinGQL and MediGQL. Experimental results reveal that our approach significantly outperforms a set of baseline methods, with improvements of 5.90 and 6.36 absolute points on EM, and 6.00 and 7.09 absolute points on EX for FinGQL and MediGQL, respectively.

arxiv情報

著者 Yuanyuan Liang,Keren Tan,Tingyu Xie,Wenbiao Tao,Siyuan Wang,Yunshi Lan,Weining Qian
発行日 2024-09-05 06:34:11+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.DB パーマリンク