Skip to main content
QUICK REVIEW

[논문 리뷰] KnowGPT: Knowledge Graph based Prompting for Large Language Models

Qinggang Zhang, Junnan Dong|arXiv (Cornell University)|2023. 12. 11.
Topic Modeling인용 수 4
한 줄 요약

KnowGPT는 ChatGPT 및 GPT-4와 같은 대규모 언어모델(Large Language Models, LLMs)을 지식 그래프(Knowledge Graphs, KGs)를 통해 암시적 지식 주입 방식으로 향상시키는 블랙박스 지식 주입 프레임워크이다. 이는 모델의 API 접근만을 통해 작동하며, 심층 강화학습(Deep Reinforcement Learning)을 활용해 지식 그래프에서 관련 있는 추론 경로를 추출하고, 다중 손잡이 락키(Multi-Armed Bandit, MAB)를 통해 최적의 프롬프트를 자동으로 구성한다. 이로 인해 ChatGPT 대비 평균 23.7% 향상된 성능을 기록했으며, OpenbookQA에서 91.6%의 정확도를 달성하여 인간 수준의 성능에 근접하였다.

ABSTRACT

Large Language Models (LLMs) have demonstrated remarkable capabilities in many real-world applications. Nonetheless, LLMs are often criticized for their tendency to produce hallucinations, wherein the models fabricate incorrect statements on tasks beyond their knowledge and perception. To alleviate this issue, researchers have explored leveraging the factual knowledge in knowledge graphs (KGs) to ground the LLM's responses in established facts and principles. However, most state-of-the-art LLMs are closed-source, making it challenging to develop a prompting framework that can efficiently and effectively integrate KGs into LLMs with hard prompts only. Generally, existing KG-enhanced LLMs usually suffer from three critical issues, including huge search space, high API costs, and laborious prompt engineering, that impede their widespread application in practice. To this end, we introduce a novel Knowledge Graph based PrompTing framework, namely KnowGPT, to enhance LLMs with domain knowledge. KnowGPT contains a knowledge extraction module to extract the most informative knowledge from KGs, and a context-aware prompt construction module to automatically convert extracted knowledge into effective prompts. Experiments on three benchmarks demonstrate that KnowGPT significantly outperforms all competitors. Notably, KnowGPT achieves a 92.6% accuracy on OpenbookQA leaderboard, comparable to human-level performance.

연구 동기 및 목표

  • ChatGPT 및 GPT-4와 같은 블랙박스 대규모 언어모델이 가진 모델 가중치에 대한 액세스가 불가능하고, 파라미터를 미세조정할 수 없는 한계를 해결하기 위해.
  • LLM의 가중치를 수정하지 않고도 도메인 특화 지식을 지식 그래프(KG)에서 주입함으로써 질문 응답의 사실적 정확도를 향상시키기 위해.
  • 입력 길이 제약 조건 하에서 관련 있는 지식 그래프 삼중항을 선택하고 효과적인 프롬프트를 구성하는 데 발생하는 과제를 해결하기 위해.
  • 질문에 따라 최적의 프롬프트 템플릿과 경로 추출 전략을 동적으로 선택하는 프레임워크를 개발하기 위해.
  • 오픈 도메인 및 도메인 특화 질문 응답 과제에서 인간 수준의 성능 기준과 비교 가능한 성능을 달성하기 위해.

제안 방법

  • 질문 엔티티에서 답변 엔티티로 이르는 정보성 있고 간결한 추론 경로를 지식 그래프(KG)에서 추출하기 위해 심층 강화학습(RL) 에이전트를 훈련시킨다.
  • 경로 도달 가능성, 맥락 관련성, 간결성을 최대화하기 위해 맞춤형 보상 함수를 설계하여, RL 정책이 효과적인 경로 선택을 학습하도록 이끈다.
  • 각 입력 질문에 대해 경로 추출 전략과 프롬프트 템플릿의 최적 조합을 동적으로 선택하기 위해 다중 손잡이 락키(MAB) 프레임워크를 활용한다.
  • 탐색과 이용의 균형을 유지함으로써 프롬프트 구성 최적화를 달성하며, 모델 미세조정 없이 질문 특성에 맞게 적응한다.
  • 모델의 API만을 사용하여 프레임워크를 구현함으로써, GPT-4 및 ChatGPT와 같은 비공개 소스 모델과도 호환된다.
  • 프레임워크는 세 가지 벤치마크 데이터셋(CSQA, OpenbookQA, MedQA)에서 평가되었으며, 소스 지식 그래프로는 ConceptNet과 USMLE를 사용하였다.
Figure 1 : A real-world question from OpenbookQA. ChatGPT could effectively correct the answer given the scientific reasoning background from ConceptNet ( blue : question concepts, red : answers, grey : entities not present in questions).
Figure 1 : A real-world question from OpenbookQA. ChatGPT could effectively correct the answer given the scientific reasoning background from ConceptNet ( blue : question concepts, red : answers, grey : entities not present in questions).

실험 결과

연구 질문

  • RQ1모델의 가중치에 액세스할 수 없는 블랙박스 지식 주입 프레임워크가 질문 응답 성능 향상에 효과적으로 기여할 수 있는가?
  • RQ2엄격한 입력 길이 제약 조건 하에서 대규모 지식 그래프에서 관련 지식을 효율적으로 추출할 수 있는가?
  • RQ3지식 그래프에서 사실 정보를 통합할 때 LLM 성능을 최대화하는 데 가장 효과적인 프롬프트 구성 전략은 무엇인가?
  • RQ4동적이고 적응형 프롬프트 생성 방법이 복잡한 추론 과제에서 정적 프롬프트 템플릿을 능가할 수 있는가?
  • RQ5이러한 프레임워크가 LLM과 인간 수준의 성능 간의 사실 정확도 격차를 어느 정도 메울 수 있는가?

주요 결과

  • KnowGPT는 세 가지 벤치마크 데이터셋에서 ChatGPT 대비 평균 23.7% 향상된 성능을 기록하여 사실 정확도 향상이 뚜렷하게 입증되었다.
  • OpenbookQA 랭킹에서 KnowGPT는 91.6%의 정확도를 기록했으며, 이는 인간 수준의 성능과 유사한 결과이다.
  • GPT-4 대비 2.9% 향상된 성능을 기록하여, 최첨단 모델 대비도 효과적임을 입증하였다.
  • MAB 기반의 프롬프트 구성 전략은 정적 템플릿보다 뛰어난 성능을 보였으며, 전체 KnowGPT 시스템은 CSQA에서 82.7%, MedQA에서 92.4%의 정확도를 달성했다.
  • 제거 실험(ablation studies) 결과, RL 경로 추출 및 MAB 프롬프트 선택 구성 요소가 모두 최종 성능에 기여하며 필수적임을 확인하였다.
  • 사례 연구 결과, 프롬프트 형식이 LLM 출력에 중대한 영향을 미치며, KnowGPT의 자동 형식 선택 방식이 고정 템플릿(예: 삼중항 또는 그래프 기술)보다 항상 뛰어난 성능을 보였다.
Figure 2 : The overall architecture of our proposed black-box knowledge injection framework, i.e., KnowGPT . Given the question context and answer choices, we retrieve a question-specific subgraph from the real-world KG. Path Extraction is first dedicated to searching for the most informative and co
Figure 2 : The overall architecture of our proposed black-box knowledge injection framework, i.e., KnowGPT . Given the question context and answer choices, we retrieve a question-specific subgraph from the real-world KG. Path Extraction is first dedicated to searching for the most informative and co

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.