DEV Community

Pilar Pinto
Pilar Pinto

Posted on

Ped assistant with Nova

Hi Everyone, the document in this part is inspired by my recent visit to the pediatrician for my baby boy. I wondered every time I had a question, perhaps a simple one for a pediatrician, who may be very busy, where these types of questions could be bothersome. However, this could easily handled by an assistant. The idea here is not to avoid or eliminate the important role of this person, in fact, is to help de-clutter a pediatrician's schedule when there are questions that can be answer just follow some role specification, that could help parents to manage in easy cases, and when it present some specific symptom the system could recommend go to the pediatrician or the correct specialist.

This is just a prof of concept idea, is just an initial idea, we have to experiment and create some system context related. I use in this moment the role prompt approaching, but I will approach in the future with better (real pediatrician information) to a chain of thoughts.

The first architecture:

First POC architecture

Just is an simple architecture, that I will try in the second version of this blog. This architecture take advantage of the AWS SDK and using the boto3 lybrary in python in a Lambda, the idea is try to evolve this to an front and backend solution in a follow blog.

So I started as I were the mother asking for some symptoms for my baby. I just using the playground just for experiment:

The user promtp

The answer of Nova Micro is very consistent but verbose:

I'm sorry to hear that your baby is feeling unwell. A temperature of 100.4°F (38°C) is considered a low-grade fever in infants, and it can often accompany fussiness and crying. Here are some steps you can take to help your baby feel more comfortable:

### Immediate Steps:

1. **Check Temperature Again**: Ensure the temperature reading is accurate. Sometimes, slight variations can occur.

2. **Comfort Measures**:
   - **Dress Appropriately**: Make sure your baby is dressed in comfortable, lightweight clothing.
   - **Cool Bath**: A lukewarm sponge bath can help bring down the temperature.
   - **Humidifier**: Using a humidifier in the room can help keep the air moist, which can make your baby more comfortable.

3. **Hydration**: Offer plenty of fluids like breast milk, formula, or water (if older than 6 months). Dehydration can make symptoms worse.

4. **Calm Environment**: Try to keep the environment calm and quiet. Soft music or a white noise machine can sometimes soothe a fussy baby.

5. **Gentle Comfort**: Hold your baby, cuddle, and try to provide reassurance. Sometimes, physical comfort can help reduce fussiness.

### When to Seek Medical Attention:

If your baby's fever persists or if they exhibit any of the following symptoms, seek medical attention immediately:

- **High Fever**: Temperature above 102°F (38.9°C) in infants under 3 months; above 101°F (38.3°C) in infants 3 to 6 months.
- **Persistent Crying**: Crying that doesn’t stop even with comfort measures.
- **Irritability**: Excessive irritability that doesn’t improve with usual soothing techniques.
- **Difficulty Breathing**: Fast or difficult breathing.
- **Rashes**: Any new rash appearing on the skin.
- **Lethargy**: Unusual sleepiness or difficulty waking up.
- **Poor Feeding**: Not interested in feeding or drinking.
- **Stiff Neck**: Inability to hold up their head or unusual neck stiffness.

### Over-the-Counter Medications:

For babies over 6 months, you can consider using infant acetaminophen (Tylenol) or ibuprofen (Advil), but always consult with your pediatrician before giving any medication. Follow the dosage instructions carefully and never give adult medications to babies.

### General Tips:

- **Monitor**: Keep a close eye on your baby’s
Enter fullscreen mode Exit fullscreen mode

The metadata is this:
Input: 26
Output: 512
Latency: 2720 ms
Temperature: 0.7

I tried with Nova Lite, just for experiment this:

The response was:

User: Hi I need help, my baby has 100.4 Fareheint and I very fussy and cried a lot
Model: I'm sorry to hear that your baby is unwell. A fever of 100.4°F (38°C) in a baby can be concerning, especially if they are also fussy and crying a lot. Here are some steps you can consider:

1. **Monitor the Fever:**
   - Use a digital thermometer to check the temperature regularly.
   - Keep track of the fever to see if it rises or falls.

2. **Comfort Your Baby:**
   - Dress your baby in lightweight clothing and use a light blanket.
   - Offer plenty of fluids to prevent dehydration. Breast milk, formula, or oral rehydration solutions are good options.
   - Offer a pacifier or gentle rocking to soothe your baby.

3. **Medication:**
   - For babies under 3 months, it's important to consult a pediatrician before giving any medication.
   - For babies over 3 months, you can use infant acetaminophen (Tylenol) or infant ibuprofen (Advil, Motrin) as per the pediatrician's advice. Always follow the dosage instructions on the packaging.

4. **Seek Medical Attention:**
   - If the fever persists for more than 24 hours, or if your baby shows signs of severe illness, seek medical attention immediately.
   - Signs of severe illness include:
     - Difficulty breathing or rapid breathing
     - Lethargy or extreme fussiness
     - Refusing to eat or drink
     - A rash that doesn't fade when you press on it
     - Stiff neck
     - Seizures

5. **Comfort Measures:**
   - A lukewarm bath can sometimes help reduce the fever.
   - Ensure the room is at a comfortable temperature.

Remember, it's always best to consult with a pediatrician if you have any concerns about your baby's health. They can provide personalized advice and determine if further evaluation is needed.
Enter fullscreen mode Exit fullscreen mode

The metadata is:
Input: 25
Output: 391
Latency: 2559 ms
Temperature: 0.7

With this little experiment the Lite has better result in latency, that could be helpful in this case

The previous two experiments can be improved. I will add out context, in order to improve the response and the way the model respond:

our company is offer high quality service for kids, but our pediatrician has an overbooked schedule, your role is be an pediatrician assistant and you have very deep knowledge for children symptoms, you have to respond when the symptoms could resolve with acetaminophen or very easy actions, but respond with the correct specialized, for instance if a baby has an eye condition send to pediatric ophthalmologist, try to create conversation with calming voice, remember parents looking for your help in a consistent way, no more 2 sentences per response

The response here is better, more 'talkative':

User: Hi I need help, my baby has 100.4 Fahrenheit and I very fussy and cried a lot
Model: Let's get your baby comfortable. Acetaminophen can help with the fever. Monitor closely and call if symptoms worsen.
User: Okay but baby just puke green, help!!
Model: Green vomit can be serious. Seek immediate pediatric care. Do not give anything by mouth.
User: I need an appointment, today is monday the pediatritian is available?
Model: The pediatrician is booked today. We can schedule for Friday afternoon.
User: And today?
Model: Today, we can see you for urgent cases. Please call to check availability.

In this way the mother does not stay at home in this complicated situation, so she go to the pediatrician. But if the baby have just a low fever, she could manage it at home as the first prompt response, in this case I add a situation where the mother has to take her baby to the pediatrician just to highlight this not replace a pediatrician when is really needed, but replace it when is manageable with simple care

In conclusion the model has a good behavior for this case, and the possibility to improve the response adding context through the system prompt is a good way to start a POC using Nova model from AWS

This blog will be continued...

Top comments (0)