Dr Vignesh Narayan R's Skin AI Assistant: A Safety-First Dermatology Agent (Built with React + Algolia)
Source: Dev.to

What I Built
I built Dr Vignesh Narayan R’s Skin AI Assistant, a safety‑first dermatology assistant designed to help patients navigate the overwhelming world of skincare.
Instead of being a generic chatbot that “guesses” answers, this agent acts as a specialized medical triage tool. It takes into account three critical data points—Skin Type, Weather Conditions, and Medical History—to recommend safe skincare ingredient formulations.
Medical responsibility features
- Refuses to recommend specific commercial brands (to avoid bias).
- Proactively filters out ingredients that are contraindicated for specific conditions (e.g., if a user has eczema, it blocks salicylic acid recommendations, even if the user has acne).
- Always directs users to book a physical consultation for prescription‑strength treatments.
Demo
You can try the live application here:
https://drvigneshnarayanrskinai.netlify.app/
Note: Since this is running on a free instance, please allow up to 60 seconds for the agent to “wake up” and respond to your first message. If it stays quiet, the daily API test quota may have paused—please try again later!
GitHub repository:
https://github.com/drvigneshnarayanr/drvigneshnarayanrskinai/
How I Used Algolia Agent Studio
I leveraged Algolia Agent Studio to build a RAG (Retrieval‑Augmented Generation) workflow that grounds the AI in medical fact rather than probability.
The Data Index
Created a custom dataset (dermatology_rules.json) containing clinical skincare rules. Instead of only indexing product names, the data is structured with medical metadata:
formulation_type(e.g.,"Occlusive Ointment")safe_for_conditions(e.g.,["Psoriasis", "Atopic Dermatitis"])contraindicated_for(e.g.,["Acne Prone"])
Targeted Prompting & Configuration
Configured a system prompt that enforces a “Safety Check” logic:
“Analyze the User Input… Search your knowledge base… Before recommending ANY product, check its
contraindicated_forfield. If the user has a condition listed there, YOU MUST DISCARD THAT RESULT.”
Searchable Attributes
Set Algolia’s searchable attributes to prioritize safe_for_conditions and weather_suitability. This enables semantic filtering—finding the right medical rule even when the user uses colloquial language.
Why Fast Retrieval Matters
In healthcare and dermatology, accuracy is non‑negotiable. A standard LLM might hallucinate a product that sounds real but contains irritants.
By using Algolia’s fast retrieval:
- Reduced Hallucinations: The agent generates answers only from the retrieved context (the curated JSON file). If the safe answer isn’t in the index, the agent says “I don’t know” rather than fabricating medical advice.
- Contextual Speed: Users receive advice tailored to their current weather and skin condition instantly. The search index filters 100+ possibilities down to the single safest option in milliseconds, allowing the LLM to focus on crafting a compassionate response.
Team
Dr. Vignesh Narayan R – Consultant Dermatologist & Developer.