Skip to content

Commit

Permalink
chore: Tweaked prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
attiks committed Nov 24, 2023
1 parent b8aed9b commit c7cb3f3
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions html/modules/custom/reliefweb_openai/reliefweb_openai.module
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,39 @@ function reliefweb_openai_http_call_azure($query) {
* Get prompt.
*/
function reliefweb_openai_get_prompt($job = TRUE) {
if ($job) {
return 'Extract the required years of job experience, career category, humanitarian theme (One of Agriculture, Camp Coordination and Camp Management, Climate Change and Environment, Contributions, Coordination, Disaster Management, Education, Food and Nutrition, Gender, Health, HIV/AIDS, Humanitarian Financing, Logistics and Telecommunications, Mine Action, Peacekeeping and Peacebuilding, Protection and Human Rights, Recovery and Reconstruction, Safety and Security, Shelter and Non-Food Items, Water Sanitation Hygiene) and country from the job description below and explain why you have chosen a particular humanitarian theme.' . "\n\n";
if (!$job) {
return 'Extract the humanitarian theme (One of Agriculture, Camp Coordination and Camp Management, Climate Change and Environment, Contributions, Coordination, Disaster Management, Education, Food and Nutrition, Gender, Health, HIV/AIDS, Humanitarian Financing, Logistics and Telecommunications, Mine Action, Peacekeeping and Peacebuilding, Protection and Human Rights, Recovery and Reconstruction, Safety and Security, Shelter and Non-Food Items, Water Sanitation Hygiene) and country from the text below and explain why you have chosen a particular humanitarian theme.' . "\n\n";
}

return 'Extract the humanitarian theme (One of Agriculture, Camp Coordination and Camp Management, Climate Change and Environment, Contributions, Coordination, Disaster Management, Education, Food and Nutrition, Gender, Health, HIV/AIDS, Humanitarian Financing, Logistics and Telecommunications, Mine Action, Peacekeeping and Peacebuilding, Protection and Human Rights, Recovery and Reconstruction, Safety and Security, Shelter and Non-Food Items, Water Sanitation Hygiene) and country from the text below and explain why you have chosen a particular humanitarian theme.' . "\n\n";
$lines = [
"Extract the required years of job experience, career category, country and up to 3 relevant humanitarian themes (as defined below) from the job description below and explain why you have chosen a particular humanitarian theme.",
"",
"To aid you in selecting a humanitarian theme, you can use this list with the theme and a short explanation:",
"- Agriculture: Agriculture includes fisheries; animal husbandry; and distribution of inputs such as seeds; aid activities helping to improve food security, agricultural and veterinary training.",
"- Camp Coordination and Camp Management: Camp Management and Camp Coordination includes ensuring equitable access to services and protection for displaced persons living in communal settings, to improve their quality of life and dignity during displacement, and advocate for solutions while preparing them for life after displacement.",
"- Climate Change and Environment: Climate Change and Environment includes humanitarian implications of climate change and/or environmental changes, such as increased vulnerability, migration or displacement.",
"- Contributions: Contributions is defined as financial and in-kind humanitarian aid, as announced by the recipient (government, multilateral agencies, and NGOs), by donors (government, multilateral funding institutions, and pooled funds), or in media reporting.",
"- Coordination: Coordination includes intra- and inter-cluster coordination, civil-military coordination, private sector partnership.",
"- Disaster Management: Disaster Management includes policy and operational activities pertaining to the various stages of natural disasters at all levels, including early warning, disaster preparedness, prevention, risk reduction and mitigation.",
"- Education: Education includes establishment of temporary learning spaces, provision of school supplies, and support to teachers and other school personnel, governmental entities. Post-conflict/disaster normalization support, including rehabilitation of schooling infrastructure.",
"- Food and Nutrition: Food and Nutrition includes food security, food aid, school feeding, supplementary feeding, and therapeutic feeding.",
"- Gender: Gender covers victims of emergencies or disasters and beneficiaries of humanitarian action irrespective of sex, focusing on issues affecting the genders differently. Also includes women as peacemakers and agents of change.",
"- Health: Health includes emergency medical services, equipment and supplies; reproductive health; psycho-social support; mobile medical clinics; and disease control and surveillance.",
"- HIV/AIDS: HIV/AIDS includes delivery of HIV/AIDS services in emergencies and humanitarian consequences of prolonged high prevalence.",
"- Humanitarian Financing: Humanitarian Financing includes good humanitarian donorship and related policy framework and coordinated funding mechanisms such as pooled funds (Central Emergency Response Fund (CERF), Common Humanitarian Fund (CHF), Emergency Response Fund (ERF)). Accountability and transparency. Partnership.",
"- Logistics and Telecommunications: Logistics and Telecommunications is defined as operational activities concerned with the supply, handling, storage and transportation of aid material and aid worker, and provision of ICT services and support to aid personnel serving in emergencies.",
"- Mine Action: Mine Actions addresses problems of landmines, unexploded ordinances (UXO) and explosive remnants of war (ERW), including clearance, education, victim assistance and advocacy. (Sour: UN Mine Action Gateway)",
"- Peacekeeping and Peacebuilding: Peacekeeping and Peacebuilding pertains to policies, programs, and associated efforts : resolve conflict; prevent conflict escalation; uphold law and order in a conflict zone; and restore social and political institutions disrupted by the conflict; such as ceasefire/peace negotiation; disarmament/demobilisation/reintegration; multilateral peacekeeping and political missions; and electoral support/observation missions.",
"- Protection and Human Rights: Protection and Human Rights pertains to civilians, IDPs and refugees in the context of human rights violations, gender-based violence, international humanitarian, criminal and human rights law, including humanitarian access.",
"- Recovery and Reconstruction: Recovery and Reconstruction includes replacement/restoration of assets, infrastructure and livelihoods lost, damaged or interrupted in natural disasters or conflict. The theme also covers Early Recovery which encompass specific interventions to help people move from dependence on humanitarian relief towards sustainable development.",
"- Safety and Security: Safety and Security is defined as policies, measures and incidents relating to safety and security of humanitarian aid workers in the field. Safety and security of civilians is covered under “Protection and Human Rights.”",
"- Shelter and Non-Food Items: Shelter and Non-Food Items includes provision of shelter materials and non-food household item packages. The theme also covers Camp Coordination and Camp Management. Long-term/permanent reconstruction/rebuilding of housing is covered under \"Recovery and Reconstruction.\"",
"- Water Sanitation Hygiene: Water Sanitation Hygiene includes emergency provision of safe drinking water, hygiene and sanitation services, environmental sanitation and water supply, as well as hygiene promotion campaigns.",
"",
"Job description:",
"",
"",
];

return implode("\n", $lines);
}

0 comments on commit c7cb3f3

Please sign in to comment.