Prompt Engineering | Prompt Versioning | Use GPT or other prompt based models to get structured output. Join our discord for Prompt-Engineering, LLMs and other latest research
This is the network call which happens while doing the NER.
'Request to OpenAI API' method=post path=https://api.openai.com/v1/completions
data='{"model": "text-davinci-003", "prompt": "It is related to detection of symptoms and diseases for medical domain\nYou are a highly intelligent and accurate medical domain Named-entity recognition(NER) system. You take Passage as input and your task is to recognize and extract specific types of medical domain named entities in that given passage and classify into a set of following predefined entity types:\n[\'SYMPTOM\', \'DISEASE\']Your output format is only [{{\'T\': type of entity from predefined entity types, \'E\': entity in the input text}},...,{{\'branch\' : Appropriate branch of the passage ,\'group\': Appropriate Group of the passage}}] form, no other form.\n\nExamples:\n\nInput: Leptomeningeal metastases (LM) occur in patients with breast cancer (BC) and lung cancer (LC). The cerebrospinal fluid (CSF) tumour microenvironment (TME) of LM patients is not well defined at a single-cell level. We did an analysis based on single-cell RNA sequencing (scRNA-seq) data and four patient-derived CSF samples of idiopathic intracranial hypertension (IIH)\nOutput: [[{\'E\': \'DISEASE\', \'W\': \'Leptomeningeal metastases\'}, {\'E\': \'DISEASE\', \'W\': \'breast cancer\'}, {\'E\': \'DISEASE\', \'W\': \'lung cancer\'}, {\'E\': \'BIOMARKER\', \'W\': \'cerebrospinal fluid\'}, {\'E\': \'DISEASE\', \'W\': \'tumour microenvironment\'}, {\'E\': \'TEST\', \'W\': \'single-cell RNA sequencing\'}, {\'E\': \'DISEASE\', \'W\': \'idiopathic intracranial hypertension\'}]]\n\nInput: The patient is a 93-year-old female with a medical history of chronic right hip pain, osteoporosis, hypertension, depression, and chronic atrial fibrillation admitted for evaluation and management of severe nausea and vomiting and urinary tract infection\nOutput:", "temperature": 0.7, "max_tokens": 3550, "top_p": 0.1, "frequency_penalty": 0, "presence_penalty": 0, "stop": null}'
We are asking the output to be in the format => {\'T\': type of entity from predefined entity types, \'E\': entity in the input text. }
However, in the one shot examples we provide it in the format E: Entity Type, W: Entity name.
Isn't this incorrect? If it isn't what is the reason for providing the examples in this format?
This is the network call which happens while doing the NER.
'Request to OpenAI API' method=post path=https://api.openai.com/v1/completions data='{"model": "text-davinci-003", "prompt": "It is related to detection of symptoms and diseases for medical domain\nYou are a highly intelligent and accurate medical domain Named-entity recognition(NER) system. You take Passage as input and your task is to recognize and extract specific types of medical domain named entities in that given passage and classify into a set of following predefined entity types:\n[\'SYMPTOM\', \'DISEASE\']Your output format is only [{{\'T\': type of entity from predefined entity types, \'E\': entity in the input text}},...,{{\'branch\' : Appropriate branch of the passage ,\'group\': Appropriate Group of the passage}}] form, no other form.\n\nExamples:\n\nInput: Leptomeningeal metastases (LM) occur in patients with breast cancer (BC) and lung cancer (LC). The cerebrospinal fluid (CSF) tumour microenvironment (TME) of LM patients is not well defined at a single-cell level. We did an analysis based on single-cell RNA sequencing (scRNA-seq) data and four patient-derived CSF samples of idiopathic intracranial hypertension (IIH)\nOutput: [[{\'E\': \'DISEASE\', \'W\': \'Leptomeningeal metastases\'}, {\'E\': \'DISEASE\', \'W\': \'breast cancer\'}, {\'E\': \'DISEASE\', \'W\': \'lung cancer\'}, {\'E\': \'BIOMARKER\', \'W\': \'cerebrospinal fluid\'}, {\'E\': \'DISEASE\', \'W\': \'tumour microenvironment\'}, {\'E\': \'TEST\', \'W\': \'single-cell RNA sequencing\'}, {\'E\': \'DISEASE\', \'W\': \'idiopathic intracranial hypertension\'}]]\n\nInput: The patient is a 93-year-old female with a medical history of chronic right hip pain, osteoporosis, hypertension, depression, and chronic atrial fibrillation admitted for evaluation and management of severe nausea and vomiting and urinary tract infection\nOutput:", "temperature": 0.7, "max_tokens": 3550, "top_p": 0.1, "frequency_penalty": 0, "presence_penalty": 0, "stop": null}'
We are asking the output to be in the format => {\'T\': type of entity from predefined entity types, \'E\': entity in the input text. }
However, in the one shot examples we provide it in the format E: Entity Type, W: Entity name.
Isn't this incorrect? If it isn't what is the reason for providing the examples in this format?