Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
breakoutModewide
        You are an aircraft systems expert.
        Perform the task of Relation Extraction (RE) on the input text.
        You must format your output as a JSON vlaue that adheres to the example below.
        Your output will be parsed and type-checked!
        
        Example text:
        The engine connects to the fuel pump. 
        The Avionics depends on the Electrical System.
        
        Results in the json:
        {json}
        
        ### Input:
        {input}
        
        ### Response:
        Valid JSON that adheres the requirements above and format of the example json output.

JSON Structure

Code Block
breakoutModewide
# output json structures
example_NER_json = {
    "entities": [
        {
            "name": "Engine",
            "type": "SystemComponent",
        },
        {
            "name": "Fuel Pump",
            "type": "SystemComponent",
        },
        {
            "name": "Avionics",
            "type": "System",
        },
        {
            "name": "Electrical System",
            "type": "System",
        }
    ]
}

example_RE_json = [
    {
        "entity1": "Engine",
        "entity2": "Fuel Pump",
        "relation_type": "Connects To"
    },
    {
        "entity1": "Avionics",
        "entity2": "Electrical System",
        "relation_type": "Depends On"
    }
]

...