🚀 Overview

As part of the Gen AI Intensive Course by Google & Kaggle, I built a PetCare AI Assistant — a conversational tool that helps pet owners get structured health advice based on their pet’s symptoms.

Rather than just prompting an LLM, I implemented a full Retrieval-Augmented Generation (RAG) pipeline using Gemini, vector search, and real veterinary PDFs. The assistant outputs actionable diagnostic advice in structured JSON format, with urgency level and recommended next steps.


💡 The Problem

Most pet owners rely on scattered or unverified sources when their pet falls ill. The goal was to build an AI assistant that could understand a pet's symptoms and generate grounded, real-time advice — powered by GenAI and veterinary documents.


✅ GenAI Capabilities Demonstrated

1.Few-shot Prompting
2.Document Understanding (PDFs)
3.Structured JSON Output
4.Retrieval-Augmented Generation (RAG)
5.Evaluation of output vs expert diagnosis


📂 Dataset & Documents

I used real-world veterinary PDFs including:

  • Indian Government's Standard Treatment Guidelines (Livestock & Pets)
  • BSN Medical Veterinary Case Study Booklet
  • Veterinary Clinical Pathology reports (academic cases)

I extracted text using PyMuPDF, chunked it, and used semantic search with sentence-transformers.


🧠 Gemini + RAG Workflow

Here’s how it works:

  1. 📝 User submits a symptom query
  2. 📚 Most relevant document chunks are retrieved using embeddings
  3. 🧠 Gemini is prompted with few-shot examples + document context
  4. 🧾 Gemini generates a structured diagnosis like:
{
  "problem_category": "health",
  "preliminary_diagnosis": "Gastrointestinal upset likely due to spoiled food",
  "suggested_action": "Provide hydration, switch to bland diet, consult vet if persists",
  "recommended_services": ["Vet Consultation", "Diet Review"],
  "urgency": "Medium"
}

🔗 Kaggle Notebook Link

https://www.kaggle.com/code/shashank0907/petcare-ai-assistant