(Translated by https://www.hiragana.jp/)
GitHub - cocacola-lab/ChatIE: The online version is temporarily unavailable because we cannot afford the key. You can clone and run it locally. Note: we set defaul openai key. If keys exceed plan and are invalid, please tell us. The response speed depends on openai. ( sometimes, the official is too crowded and slow)
Skip to content

The online version is temporarily unavailable because we cannot afford the key. You can clone and run it locally. Note: we set defaul openai key. If keys exceed plan and are invalid, please tell us. The response speed depends on openai. ( sometimes, the official is too crowded and slow)

Notifications You must be signed in to change notification settings

cocacola-lab/ChatIE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ChatIE🐬

Official repository of paper "Zero-Shot Information Extraction via Chatting with ChatGPT". Please star, watch, and fork our repo for the active updates!

Abstract

Zero-shot information extraction (IE) aims to build IE systems from the unannotated text. It is challenging due to involving little human intervention. Challenging but worthwhile, zero-shot IE reduces the time and effort that data labeling takes. Recent efforts on large language models (LLMs, e.g., GPT3, ChatGPT) show promising performance on zero-shot settings, thus inspiring us to explore prompt-based methods. In this work, we ask whether strong IE models can be constructed by directly prompting LLMs. Specifically, we transform the zero-shot IE task into a multi-turn question-answering problem with a two-stage framework (ChatIE). With the power of ChatGPT, we extensively evaluate our framework on three IE tasks: entityrelation triple extract, named entity recognition, and event extraction. Empirical results on six datasets across two languages show that ChatIE achieves impressive performance and even surpasses some full-shot models on several datasets (e.g., NYT11-HRL). We believe that our work could shed light on building IE models with limited resources.

れい样本しんいき抽取(Information Extraction,IE)むねざい从无标注文ちゅうもん本中ほんなか建立こんりゅうIEけい统,いん为很しょうわたる及人为干预,该问题非常ひじょう具有ぐゆう挑战せいただしれい样本IEさい需要じゅよう标注すうすえ时耗费的时间和人わじんりょくいんじゅうふん重要じゅうよう近来きんらいてきだい规模语言模型もけいれい如GPT-3,Chat GPT)ざいれい样本设置取得しゅとくりょう很好てきひょう现,这启发我们探索たんさくもと提示ていじてき方法ほうほうらいかい决零样本IEにん务。わが提出ていしゅついち个问题:经过训练らい实现れい样本しんいき抽取ぎょうわが们将れい样本IEにん务转变为一个两阶段框架的多轮问答问题(Chat IE),并在さん个IEにん务中广泛评估りょう该框:实体关系さんげん组抽取、命名めいめい实体识别事件じけん抽取。ざい两个语言てき6个数すえしゅうじょうてき实验结果表明ひょうめい,Chat IE取得しゅとくりょう非常ひじょうこのみてき效果こうか,甚至ざい几个すうすえしゅうじょうれい如NYT11-HRL)じょうちょう过了ぜん监督模型もけいてきひょう现。わが们的工作こうさくのう够为有限ゆうげん资源IEけい统的建立こんりゅう定基さだもと础。

Methods

architecture

Results

result

Tools🧰

UPDATE: we use the official api, the tool becomes more faster!!! if the key exceed limits please tell us.

NOTICE: The response speed depends on the official openai chatgpt api. (sometimes, the official is too crowded and the speed will be slow or the chatgpt will be overloaded.) Moreover, you better use your own openai key because if our default account is used by multiple people at the same time, the account may be overloaded.

NOTICE: because official api is not available in domestic, so we use api from revChatGPT and v1 version. But it's too slow, so we advise you use the tool offline for study. We will update the api further in the future (TODO).

we also provide a IE tool based on GPT3.5, you can see in GPT4IE

Description

ChatIE (Zero-Shot Information Extraction via Chatting with ChatGPT) is a open-source and powerful IE tool demo. Enhanced by ChatGPT and prompting, it aims to automatically extract structured information from a raw sentence and make a valuable in-depth analysis of the input sentence. Harnessing valuable structured information helps corporations make incisive and business–improving decisions.
Present

We support the following functions:

Task Name Lauguages
RE entity-relation joint extraction Chinese, English
NER named entity recoginzation Chinese, English
EE event extraction Chinese, English

RE

This task aims to extract triples from plain texts, such as (China, capital, Beijing) , (《如懿传》, 主演しゅえん, しゅう迅).

Input
  • sentence: a plain text.
  • relation type list (rtl)* : {'relation type 1': ['subject1', 'object1'], 'relation type 2': ['subject2', 'object2'], ...}

PS: * denote optional, we set default value for them. But for better extraction, you should specify the three list according to application scenarios.

Examples

sentence: Four other Google executives the chief financial officer , George Reyes ; the senior vice president for business operations , Shona Brown ; the chief legal officer , David Drummond ; and the senior vice president for product management , Jonathan Rosenberg earned salaries of $ 250,000 each .
rtl: default, see file "default-types"
ouptut:
ouptut

sentence: だい:《如懿传》《如懿传》一部古装宫廷情感电视剧,よしひろししゅん执导,しゅう迅、霍建华、张钧甯、ただし洁、からし芷蕾、わらわよう纯、邬君うめとう主演しゅえん
rtl: default, see file "default-types"
ouptut:
ouptut


NER

This task aims to extract entities from plain texts, such as (LOC, Beijing) , (人物じんぶつ, しゅう恩来おんらい).

Input
  • sentence: a plain text.
  • entity type list (etl)* : ['entity type 1', 'entity type 2', ...]
Examples

sentence: James worked for Google in Beijing, the capital of China. etl: ['LOC', 'MISC', 'ORG', 'PER']
ouptut:
ouptut

sentence: 中国ちゅうごくども产党创立于中华民国大こくだい陆时ゆかり陈独秀和しゅうわだい钊领导组织。
etl: ['组织つくえ构', '地点ちてん', '人物じんぶつ']
ouptut:
ouptut


EE

This task aims to extract event from plain texts, such as {Life-Divorce: {Person: Bob, Time: today, Place: America}} , {竞赛ぎょう为-すすむ级: {时间: 无, すすむ级方: 西北せいほくおおかみ, すすむ级赛ごと: ちゅうかぶと榜首そう}}.

Input
  • sentence: a plain text.
  • event type list (etl)* : {'event type 1': ['argument role 1', 'argument role 2', ...], ...}

sentence: Yesterday Bob and his wife got divorced in Guangzhou.
etl: default, see file "default-types"
ouptut:
ouptut

sentence: ざい2022ねん卡塔尔世かいはい决赛ちゅうおもね廷以てんだまだい战险胜法こく
etl: default, see file "default-types"
ouptut:
ouptut


Setup

react+flask

  1. cd front-end and Run npm install to download required dependencies.
  2. Run npm run start. ChatIE should open up in a new browser tab.
  3. cd back-end and Run python run.py.
  4. note: node-version v14.17.4 npm-version 9.6.0
  5. you may need to configure proxy on your machine.

Examples

RE

re-1 re-4 re-3

NER

ner-3 ner-2

EE

EE-1 EE-3


Data usage policy

We are committed to improving our project and providing you with the best possible experience. To achieve this, we will collect your data to help us understand how you interact with our project and identify areas for improvement. We value the privacy and security of your data and ensure the data only for the purposes of improving our project.

Citation

Checkout this paper arxiv: 2302.10205

@article{wei2023zero,
  title={Zero-Shot Information Extraction via Chatting with ChatGPT},
  author={Wei, Xiang and Cui, Xingyu and Cheng, Ning and Wang, Xiaobin and Zhang, Xin and Huang, Shen and Xie, Pengjun and Xu, Jinan and Chen, Yufeng and Zhang, Meishan and others},
  journal={arXiv preprint arXiv:2302.10205},
  year={2023}
}

About

The online version is temporarily unavailable because we cannot afford the key. You can clone and run it locally. Note: we set defaul openai key. If keys exceed plan and are invalid, please tell us. The response speed depends on openai. ( sometimes, the official is too crowded and slow)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published