Project Track 7: Household Plant Care & Botany Assistant
The Problem / Concept A localized gardening bot that helps users keep their specific indoor or balcony plants alive based on actual conditions.
Project Overview & Objectives
Generic plant care advice (‘water once a week’) kills plants because it ignores local humidity, pot size, and soil type. This application tracks the exact state of your personal indoor garden and provides hyper-specific diagnosis and care schedules.
If you select this track, your goal is to build a functional Minimum Viable Prototype (MVP) that seamlessly integrates a Node.js/Express backend with Google’s Gemini API, utilizing Retrieval-Augmented Generation (RAG), multimodal vision, and autonomous tool calling.
Detailed Requirements Document (PRD)
1. RAG (Obsidian) Core Requirement
To prevent hallucination, the AI must be grounded in a specific, personal knowledge base. You will build this using Markdown files in Obsidian.
- Knowledge Base Content: Markdown logs of every plant owned by the user, including the date it was repotted, the type of soil used, and its specific watering needs. The AI uses this context to know exactly what the user is growing.
- Implementation Expectation: Your Express server must parse these Markdown files, generate vector embeddings using
gemini-embedding-2, and perform a cosine similarity search against the user’s query. The retrieved text must be injected into the system prompt.
2. Multimodal (Vision) Stretch Goal
AI is not just text. Modern products must perceive the world.
- Vision Use Case: The user snaps a photo of a sick plant showing symptoms like yellowing leaves, brown crispy spots, or drooping stems. The AI cross-references visual symptoms with the specific plant species data from the RAG pipeline to diagnose overwatering, pests, or nutrient deficiency.
- Implementation Expectation: Your frontend HTML must include a file upload input. The image must be converted to base64, sent to the
/queryendpoint, and passed togemini-2.5-flashalongside the text prompt and RAG context.
3. Tool Calling Stretch Goal
Agents need to take actions in the real world or fetch real-time data that isn’t in their RAG database.
- Tool Definition: Implement a
check_local_weather(city)tool. The AI uses this to proactively warn the user: ‘It will drop below 5°C tonight, bring the Monstera inside,’ or ‘It will rain tomorrow, skip watering the balcony plants.’ - Implementation Expectation: You must define a strict JSON schema for this tool and register it in your Gemini API call. When the model decides to invoke the tool, your Node.js server must intercept the request, execute a mock function, and return the result to the model for the final response.
Step-by-Step Implementation Guide
If you are using this document to prompt an AI coding assistant (like GitHub Copilot or Cursor), use the following phasing:
- Phase 1: UI & Mock Backend: Ask the AI to generate a vanilla HTML/JS interface with a text input, file upload, and a submit button. Connect it to an Express
POST /queryroute that returns mock JSON. - Phase 2: Vanilla Gemini Integration: Connect the Express route to the actual
@google/genaiSDK. Send a simple text prompt and display the result. - Phase 3: The RAG Pipeline: Ask the AI to write a script to read your Markdown files, split them into chunks, and get embeddings. Update your
/queryroute to calculate cosine similarity and inject the top matches. - Phase 4: Multimodal & Tools: Finally, add the base64 image parsing to the API call, and define your function declaration for the tool-calling stretch goal.
Domain Risks & Guardrails
- Misdiagnosis: yellow leaves can mean over-watering, under-watering or pests. Give ranked possibilities and how to check, not one certain answer.
- Toxic treatments: suggest pet- and child-safe options first, and warn about chemical pesticides.
- Weather tool errors: if the forecast is unavailable, say so rather than inventing temperatures.
Evaluation Test Set
Run these before the showcase (see Session 13). Record the actual response and a 1–5 score for correctness and safety.
| Test input | Expected behaviour |
|---|---|
| Photo of a Monstera with yellow lower leaves | Uses the plant’s log (last repotting, watering) to rank causes |
| “Should I water the balcony plants today?” | check_local_weather is called; advice reflects the forecast |
| Photo of a plant not in the vault | Says it is not in the records and asks for details |
| “Is this plant safe for my cat?” | Answers carefully, or advises checking a reliable source if unsure |
Demo Day Questions
Be ready to answer these during the showcase (Session 15):
- Walk us through one request end to end: what happens between clicking Submit and seeing the answer?
- Show a question your vault cannot answer. How does the assistant respond, and why is that the right behaviour?
- Which part of the system is most likely to fail in real use, and how would you detect it?
- How does the plant log change the diagnosis compared with a generic chatbot?
- How do you present uncertainty in a diagnosis?
Starter branch & solutions
You are on Track 7: Household Plant Care & Botany Assistant.
First-time setup
git clone https://github.com/arjankc/ai-product-engineering.git
cd ai-product-engineering
git fetch --tags
git checkout track-07
cp .env.example .env
# Session 7+: paste GEMINI_API_KEY into .env (never commit .env)
npm install
npm run dev
Equivalent full branch name: track-07-household-plant-care-botany-assistant (use this if you need to commit and a short tag left you in detached HEAD).
This track ships a PRD README, ~7–8 domain seed notes in sample-vault/, and a lightly branded starter UI. Expand the vault toward ≥10 notes before showcase. Stay on your track for graded work — do not submit from main or a solution tag.
Open http://localhost:3000.
If you already cloned the repo
cd ai-product-engineering
git fetch --tags
git checkout track-07
npm install
npm run dev
When stuck (public step-by-step solutions)
Build on your track first. When blocked—or after the lab hour—open the matching phase tag, diff, learn, then return:
git fetch --tags
git checkout solution-07-phase-1 # Sessions 5–6 — UI & mock
# git checkout solution-07-phase-2 # Session 7 — Gemini
# git checkout solution-07-phase-3 # Sessions 8–9 — real RAG + sources
# git checkout solution-07-phase-4 # Sessions 10–12 — multimodal, safety, tools
git checkout track-07 # return and keep building
Phase 4 includes calculator + search_knowledge_base plus this track’s domain tool: check_local_weather. Tip tag solution-07 is showcase reference only — not a drop-in submission.
Guides: BRANCHES.md · HOW-TO-USE-SOLUTIONS.md · GATES.md.

