Introduction
Precision in maternal health is life saving. Generic AI advice risks alienating expectant mothers in rural East Africa by ignoring local constraints. By engineering prompts that respect cultural contexts, dietary realities, and infrastructural limits, we transform AI from a detached oracle into an empathetic, actionable tool for community health.
Rewritten Prompts
Prompt A (Nutrition Advice)
Current version: "Give nutrition tips for pregnant women."
Rewritten version:
You are a Kenyan maternal health nutritionist. A pregnant user from a rural village texts asking what she should eat today to stay healthy. Your goal is to provide a culturally relevant, affordable meal suggestion. Remember that rural budgets are tight and meat is rarely consumed daily. Use the fact that matooke provides 60% of daily calories in this region to anchor your advice. Generate a short, friendly SMS suggesting one affordable, iron-rich local vegetable to add to a matooke-based meal.
A : Kenyan maternal health nutritionist.
I :A pregnant user from a rural village texts asking what she should eat today.
M: Provide a culturally relevant, affordable meal suggestion.
M:Rural budgets are tight and meat is rarely consumed daily.
A:Data: "Matooke provides 60% of daily calories in this region."
P:Generate a short, friendly SMS suggesting an affordable, iron-rich local vegetable to add to a matooke-based meal.
Key Improvement:
Better cultural alignment. By utilizing the specific Asset that matooke is the primary calorie base, the AI avoids recommending inaccessible Western diets, significantly improving user adherence and trust.
Prompt B (Appointment Reminders)
Current version: "Remind users about doctor visits."
Rewritten version:
"You are an empathetic AfyaTech clinic coordinator. An expectant mother’s system profile flags that she has an antenatal visit tomorrow. Your goal is to ensure she attends the visit safely without feeling overwhelmed by logistics. Keep in mind that rural transport is often erratic, relies on boda-bodas, and can be expensive. Utilize the data that 70% of target users live >5km from clinics. Write a brief SMS reminder that acknowledges this travel distance and suggests coordinating with her local community health worker if she faces transport challenges."
A : Empathetic AfyaTech clinic coordinator.
I : An expectant mother’s system profile flags an antenatal visit tomorrow.
M :Ensure she attends the visit safely without feeling overwhelmed by logistics.
M :Rural transport is erratic, relies on boda-bodas, and is expensive.
A :Data: "70% of target users live >5km from clinics" and knowledge of Community Health Worker networks.
P :Write a brief SMS reminder acknowledging the travel distance and suggesting CHW coordination.
Key Improvement: Reduced hallucination of easy access. Acknowledging the >5km distance turns a passive calendar alert into a logistics-aware message, actively helping the user overcome known barriers to care.
Prompt C (Emergency Triage)
Current version: "Tell me what to do if I feel unwell during pregnancy."
Rewritten version:
"You are a calm rural triage nurse. A user texts 'I feel unwell.' Your goal is to assess her safety without causing panic or triggering unnecessary travel costs. Remember that traveling to a clinic is a major financial and physical burden. First, use Chain-of-Thought internally to evaluate the most common danger signs (e.g., bleeding, fever) versus normal pregnancy symptoms. Then, apply the Verifier Pattern: reply with an SMS asking exactly two simple 'Yes/No' questions to establish severity. Do not advise visiting a clinic until you receive her answers."
A : Calm rural triage nurse.
I :A user texts "I feel unwell."
M :Assess her safety without causing panic or triggering unnecessary travel costs.
M : Traveling to a clinic is a major financial and physical burden for the user.
A : Standard maternal health danger signs (bleeding, fever, severe abdominal pain).
P: Use Chain of Thought internally, then output an SMS asking exactly two 'Yes/No' verification questions. Wait for her reply before advising travel.
Key Improvement: Drastic reduction in false alarms. The Verifier Pattern prevents the AI from instantly defaulting to a panic-inducing "Go to the hospital" response for minor ailments like standard morning sickness.
Reflection
Applying the AIM and MAP frameworks has profoundly shifted my understanding of AI in healthcare. Initially, I viewed AI as a clinical encyclopedia that simply needed to output facts. Now, I see it as a context-dependent behavioral engine. Healthcare efficacy relies on logistics, socioeconomics, and culture as much as biology. By embedding specific Assets (like the 60% matooke statistic) and Memories (like travel burdens) directly into the Prompts, we prevent dangerous hallucinations. Prompt engineering isn't just formatting text; it is the vital process of translating universal medical knowledge into localized, accessible, and empathetic community care.