zjunlp / DeepKE

[EMNLP 2022] An Open Toolkit for Knowledge Graph Extraction and Construction
http://deepke.zjukg.cn/
MIT License
3.6k stars 694 forks source link

Vanilla prompt from CodeKGC paper #556

Closed paolo-gajo closed 4 months ago

paolo-gajo commented 4 months ago

Hello, I wanted to ask if you could please make available the vanilla prompts used for the CodeKGC paper. I am working on reproducing the results and I would like to know what the vanilla prompt looked like exactly. Thank you.

bizhen46766 commented 4 months ago

Thank you very much for your attention!

In the paper, the setting of vanilla prompts is very simple and straightforward, without any structured transformations.

For example, the input is: text: Gynecomastia in epileptics treated with phenobarbital, phenytoin, and fluoresone: two case reports.

The output is: triple_list: xxx

If you want to reproduce the results, you can try using an older version of the GPT-3.5 API. The latest GPT models have enhanced text and code semantic understanding capabilities, so using a vanilla prompt directly can also produce very good results.

bizhen46766 commented 4 months ago

Hello, you can modify the parameter value of ICL_prompt at this point in the code, replacing the code prompt data with vanilla prompts.

https://github.com/zjunlp/DeepKE/blob/4c97b1a3f3a57b94face54d6ca7f1f65117420e6/example/llm/CodeKGC/codekgc.py#L36C37-L36C47

prompt = schema_prompt + '\n' + ICL_prompt + text

bizhen46766 commented 4 months ago

If you have any further questions, please feel free to contact us via email (bizhen_zju@zju.edu.cn)