Include the last 5-10 conversation turns for continuity without overwhelming the context:
{ "message": "Any side effects I should watch for?", "patientId": "patient-uuid-123", "conversationHistory": [ {"role": "user", "content": "I was prescribed Lisinopril"}, {"role": "assistant", "content": "Lisinopril is an ACE inhibitor..."}, {"role": "user", "content": "What's the typical dosage?"}, {"role": "assistant", "content": "Typical starting dose is 10mg..."} ]}
For multiple related questions, consider the conversation flow rather than making separate requests:
// Instead of multiple separate requests// Better: Structure as a conversation{ "message": "I also wanted to ask about exercise restrictions", "patientId": "patient-uuid-123", "conversationHistory": [ {"role": "user", "content": "What side effects should I expect from Lisinopril?"}, {"role": "assistant", "content": "Common side effects include..."} ]}