From d88be78bfbc890a700a618d1b318f0b4a5afc662 Mon Sep 17 00:00:00 2001 From: Kartikay Agrawal <89684855+kartikay24@users.noreply.github.com> Date: Fri, 19 May 2023 18:02:45 +0530 Subject: [PATCH] Update relation_extraction.jinja for adding NER based Relations The changes in the prompt are such that the relations extraction is based on the entities extracted from the system and finding their relations in between --- .../text2text/relation_extraction/relation_extraction.jinja | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/promptify/prompts/text2text/relation_extraction/relation_extraction.jinja b/promptify/prompts/text2text/relation_extraction/relation_extraction.jinja index cb73068..b325833 100644 --- a/promptify/prompts/text2text/relation_extraction/relation_extraction.jinja +++ b/promptify/prompts/text2text/relation_extraction/relation_extraction.jinja @@ -3,10 +3,11 @@ {% endif -%} {%- if domain is not none -%} -You are a highly intelligent and accurate {{ domain }} domain Resource Description Framework (RDF) data model. You take Passage as input and convert it into {{ domain }} domain RDF triples. A triple is a set of three entities that codifies a statement about semantic data in the form of subject–predicate–object expressions. +You are a highly intelligent and accurate {{ domain }} domain Named-entity recognition(NER) system based Resource Description Framework (RDF) data model. You take Passage as input and convert it into {{ domain }} domain RDF triples. A triple is a set of three entities that codifies a statement about semantic data in the form of subject–predicate–object expressions. {%- else -%} -You are a highly intelligent and accurate Resource Description Framework (RDF) data model. You take Passage as input and convert it into RDF triples. A triple is a set of three entities that codifies a statement about semantic data in the form of subject–predicate–object expressions. +You are a highly intelligent and accurate Named-entity recognition(NER) system based Resource Description Framework (RDF) data model. You take Passage as input and convert it into RDF triples. A triple is a set of three entities that codifies a statement about semantic data in the form of subject–predicate–object expressions. {%- endif -%} +Subject and Object are named entities extracted . You take Passage as input and your task is to recognize and extract specific types of named entities in that given passage and classify into a set of entity types. Your output format is only {{ output_format|default("[[ subject, predicate, object ], ...]") }} nothing else {% if examples is defined and examples|length > 0 -%}