This one is based on the early JSON instructions from langchain
The output should be formatted as a JSON instance that conforms to the JSON schema below.
Here is the output schema:
{
"type": "object",
"properties": {
"task_details": {
"type": "string",
"description": "task details for the risk assessment report formatted as categorized bullet points following the outline: Brief Overview, Context of Task, Nature of Chemicals/Materials Involved, Equipment Required, Personnel Involved, Objective and Output."
},
"health_surveillance": {
"type": "string",
"description": "Systematic, regular and appropriate procedures to detect and act on early signs of work-related ill health for people exposed to certain health risks."
}
},
"required": [
"task_details",
"health_surveillance"
]
}
I have even deeper and wider instructions particularly one like this deep
The output should be formatted as a JSON instance that conforms to the JSON schema below.
Here is the output schema:
{
"type": "object",
"properties": {
"task": {
"type": "string",
"description": "Name of the task for the risk assessment report."
},
"process": {
"type": "string",
"description": "High level process of the task."
},
"people_affected": {
"type": "string",
"description": "People that may be affected by the task."
},
"hazard_controls": {
"type": "array",
"items": {
"type": "object",
"properties": {
"hazard": {
"type": "string",
"description": "A description of the hazard."
},
"hazard_sign": {
"type": "object",
"properties": {
"sign_id": {
"type": "integer",
"description": "Database ID of the sign."
},
"title": {
"type": "string",
"description": "Database Title of the sign."
},
"category": {
"type": "string",
"description": "Database Category of the sign."
},
"image_name": {
"type": "string",
"description": "Database Image name of the sign."
}
},
"required": [
"sign_id",
"title",
"category",
"image_name"
]
},
"controls": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sign": {
"type": "object",
"properties": {
"sign_id": {
"type": "integer",
"description": "Database ID of the sign."
},
"title": {
"type": "string",
"description": "Database Title of the sign."
},
"category": {
"type": "string",
"description": "Database Category of the sign."
},
"image_name": {
"type": "string",
"description": "Database Image name of the sign."
}
},
"required": [
"sign_id",
"title",
"category",
"image_name"
]
},
"description": {
"type": "string",
"description": "Description of the control."
}
},
"required": [
"sign",
"description"
]
},
"description": "Controls for the hazard"
},
"emergency_controls": {
"type": "array",
"items": {
"type": "object",
"properties": {
"sign": {
"type": "object",
"properties": {
"sign_id": {
"type": "integer",
"description": "Database ID of the sign."
},
"title": {
"type": "string",
"description": "Database Title of the sign."
},
"category": {
"type": "string",
"description": "Database Category of the sign."
},
"image_name": {
"type": "string",
"description": "Database Image name of the sign."
}
},
"required": [
"sign_id",
"title",
"category",
"image_name"
]
},
"description": {
"type": "string",
"description": "Description of the control."
}
},
"required": [
"sign",
"description"
]
},
"description": "Emergency controls for the hazard"
},
"risk_matrix": {
"type": "object",
"properties": {
"before_control_severity": {
"type": "integer",
"description": "A score from 1 to 5 of the severity of the hazard before the controls are applied."
},
"before_control_likelihood": {
"type": "integer",
"description": "A score from 1 to 5 of the likelihood of the hazard before the controls are applied."
},
"after_control_severity": {
"type": "integer",
"description": "A score from 1 to 5 of the severity of the hazard after the controls are applied."
},
"after_control_likelihood": {
"type": "integer",
"description": "A score from 1 to 5 of the likelihood of the hazard after the controls are applied."
}
},
"required": [
"before_control_severity",
"before_control_likelihood",
"after_control_severity",
"after_control_likelihood"
]
}
},
"required": [
"hazard",
"hazard_sign",
"controls",
"emergency_controls",
"risk_matrix"
]
},
"description": "Hazard controls for the task."
}
},
"required": [
"task",
"process",
"people_affected",
"hazard_controls"
]
}
Gpt4o for the first schema will follow the output schema, and put its answers on the “description” field.