Skip to main content
QUICK REVIEW

[논문 리뷰] Chat2VIS: Generating Data Visualisations via Natural Language using ChatGPT, Codex and GPT-3 Large Language Models

Paula Maddigan, Teo Sušnjak|arXiv (Cornell University)|2023. 02. 04.
Topic ModelingComputer Science인용 수 24
한 줄 요약

Chat2VIS는 자유 형식 자연어를 데이터를 시각화하는 Python 스크립트로 변환하기 위해 신중하게 설계된 프롬프트와 함께 GPT-3, Codex, ChatGPT를 사용하여, LLM을 통한 엔드-투-엔드 NL2VIS를 시연합니다.

ABSTRACT

The field of data visualisation has long aimed to devise solutions for generating visualisations directly from natural language text. Research in Natural Language Interfaces (NLIs) has contributed towards the development of such techniques. However, the implementation of workable NLIs has always been challenging due to the inherent ambiguity of natural language, as well as in consequence of unclear and poorly written user queries which pose problems for existing language models in discerning user intent. Instead of pursuing the usual path of developing new iterations of language models, this study uniquely proposes leveraging the advancements in pre-trained large language models (LLMs) such as ChatGPT and GPT-3 to convert free-form natural language directly into code for appropriate visualisations. This paper presents a novel system, Chat2VIS, which takes advantage of the capabilities of LLMs and demonstrates how, with effective prompt engineering, the complex problem of language understanding can be solved more efficiently, resulting in simpler and more accurate end-to-end solutions than prior approaches. Chat2VIS shows that LLMs together with the proposed prompts offer a reliable approach to rendering visualisations from natural language queries, even when queries are highly misspecified and underspecified. This solution also presents a significant reduction in costs for the development of NLI systems, while attaining greater visualisation inference abilities compared to traditional NLP approaches that use hand-crafted grammar rules and tailored models. This study also presents how LLM prompts can be constructed in a way that preserves data security and privacy while being generalisable to different datasets. This work compares the performance of GPT-3, Codex and ChatGPT across a number of case studies and contrasts the performances with prior studies.

연구 동기 및 목표

  • 대형 언어 모델을 통해 자유 형식 자연어를 시각화로 변환하여 엔드-투-엔드 NL2VIS를 시연합니다.
  • NL 프롬프트에서 올바른 시각화를 생성하는 데 있어 GPT-3 변형과 ChatGPT를 평가하고 비교합니다.
  • 오류가 있거나 충분히 명시되지 않은 질의에서도 견고한 시각화 생성을 가능하게 하는 프롬프트 엔지니어링의 방법을 보여줍니다.
  • 데이터 프라이버시 고려사항과 데이터셋 간 일반화 가능성을 평가합니다.

제안 방법

  • NL 프롬프트로부터 Python 스크립트를 생성하기 위해 세 가지 OpenAI LLM(text-davinci-003, code-davinci-002, 및 ChatGPT 4)을 사용합니다.
  • 데이터셋을 설명하고 코드 생성을 안내하기 위해 두 부분으로 구성된 프롬프트(Description Prompt와 Code Prompt)를 구성합니다.
  • 프롬프트를 결합하고 고정된 API 설정(temperature 0, max_tokens 500, plt.show()에서 중지)으로 LLM에 제출합니다.
  • 생성된 Python 스크립트를 Streamlit 기반의 NL 인터페이스에서 렌더링하고 NL 질의 및 차트 유형의 사용자 보완을 허용합니다.
  • 렌더링 전에 시작 부분에 Code Prompt를 삽입하고 필요 없는 지시를 제거하도록 선택적으로 편집하여 스크립트를 다듬습니다.

실험 결과

연구 질문

  • RQ1RQ1: 현재의 LLM이 NL에서 정확한 엔드-투-엔드 시각화 생성을 지원합니까?
  • RQ2RQ2: LLM을 효과적으로 활용하여 올바르고 적절하게 렌더링된 차트를 이끌어낼 수 있는 방법은 무엇입니까?
  • RQ3RQ3: NL 프롬프트에 더 강건하게 작동하는 LLM은 어느 것이며, 최신 접근법과 어떻게 비교됩니까?
  • RQ4RQ4: NL2VIS에 LLM을 사용하는 데 있는 한계와 향후 연구 방향은 무엇입니까?

주요 결과

  • 적절한 프롬프트를 통해 LLM이 엔드-투-엔드 NL2VIS를 효과적으로 지원하여 효율성과 비용 절감 가능성을 제공합니다.
  • Description 프롬프트와 Code 프롬프트를 이용한 프롬프트 엔지니어링이 다수의 LLM에서 정확한 차트 렌더링을 가능하게 합니다.
  • GPT-3, Codex, 및 ChatGPT는 사례 연구 전반에서 유사한 성능을 보이되 차트 선택에 대해 모델별 차이가 있습니다.
  • 잘못 지정되었거나 충분히 명시되지 않은 NL 프롬프트도 LLM에 의해 견고하게 처리되지만 미관 및 일관성 문제는 남아 있습니다.
  • 이 접근법은 손으로 제작한 기호 NLP 솔루션의 필요성을 줄이고 데이터 프라이버시 친화적인 프롬프트 설계를 강조합니다.
  • 결과는 NL4DV 및 ADVISor와의 비교를 포함하여 다섯 개의 데이터세트를 다룬 여섯 개의 사례 연구에서 시연됩니다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.