π 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:
- π User submits a symptom query
- π Most relevant document chunks are retrieved using embeddings
- π§ Gemini is prompted with few-shot examples + document context
- π§Ύ 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"
}
Top comments (0)