Skip to content
← All projects

Applied AI & LLM Systems

Canadian Tobacco Research Foundation · 2026

Ontario Tobacco Pathology Assistant

A grower can lose a crop to a misread leaf symptom. This tool takes a written description and photos of a sick plant and returns ranked likely conditions with the cited source behind each one, follow-up questions where the evidence is thin, and a refusal when it cannot make a confident call.

AgricultureDiagnosticsLLM retrieval

Overview

A grower can lose a crop to a misread leaf symptom. This assistant takes a written description and photos of a sick plant and returns a ranked set of likely conditions, with the cited source behind each one. Where the evidence is thin it asks targeted follow-up questions, and when it cannot make a confident call it refuses rather than guessing.

High-consequence output routes to a human reviewer before a grower acts on it. Under the hood it pairs the Claude API with pgvector retrieval over a curated 45-condition knowledge base assembled from 80+ cited sources, behind a Streamlit interface deployed on Google Cloud. Iterating on the retrieval layer lifted retrieval accuracy from 75% to 83% during development.

The problem

Crop conditions can look alike while demanding very different responses, and a misread symptom can cost a season. Authoritative guidance is scattered across extension bulletins, research papers, and institutional knowledge, and a general-purpose chatbot would answer confidently whether or not it had any basis to — exactly the wrong behavior here.

Design decisions

  1. 01

    Took description and photos as input

    A grower submits a written description together with photos of the affected plant, and the assistant reasons over both to narrow the likely conditions.

  2. 02

    Returned ranked conditions, each with its source

    Output is a ranked set of likely conditions drawn from a curated 45-condition knowledge base of 80+ cited sources, with the specific source shown behind each candidate so it can be verified.

  3. 03

    Asked follow-up questions where evidence was thin

    When retrieval does not strongly separate the candidates, the assistant asks targeted follow-up questions instead of forcing a call on incomplete information.

  4. 04

    Refused low-confidence cases by design

    When the evidence does not support a confident answer, the assistant declines rather than guessing — the safer default in a high-stakes domain.

  5. 05

    Routed high-consequence output to human review

    Any answer that could drive a costly field decision is flagged for a human reviewer before a grower acts on it, keeping a person in the loop where it matters most.

  6. 06

    Built retrieval on Claude + pgvector

    Vector retrieval over the knowledge base feeds the Claude API behind a Streamlit app on Google Cloud; iterating on chunking and retrieval raised retrieval accuracy from 75% to 83%.

Where it stands

75 → 83%

retrieval accuracy

during development

45

conditions covered

curated knowledge base

80+

cited sources

“Cite the source, ask when unsure, refuse when it cannot tell, and send the consequential calls to a human first.”
Design principles
PreviousHockey Metric ReliabilityNextSwingDNA