Intended Role
The advisor is designed for:
- Interpreting greenhouse and hydroponic sensor snapshots.
- Explaining likely causes of plant stress from environmental and nutrient indicators.
- Suggesting non-actuating corrective considerations for human review.
- Producing structured advisory notes for Pomona policy evaluation.
- Supporting agronomists, growers, and digital-twin workflows.
The advisor is not designed for:
- Autonomous control of actuators or equipment.
- Pesticide, herbicide, fungicide, or insecticide dosage recommendations.
- Replacing licensed agronomists, crop consultants, or local compliance procedures.
- Making safety-critical decisions without independent validation.
Safety Boundary
Pomona deployments should treat model output as advisory evidence only. Any operational action should pass through policy, rule, authorization, and audit layers outside the model.
Required integration pattern:
- Sensor and crop context are provided to the model.
- The model returns an explanation, risk assessment, and advisory options.
- Pomona policy services validate, constrain, approve, reject, or escalate recommendations.
- Human operators or authorized automation execute approved actions.
The model should use language such as "consider", "review", "inspect", or "escalate" instead of issuing direct equipment commands.
Example Usage
from transformers import AutoModelForCausalLM, AutoTokenizerfrom peft import PeftModelimport torch base_model_name = "google/gemma-4-E2B-it"adapter_name = "Okyanus/ai-pomona-agronomist-gemma4" tokenizer = AutoTokenizer.from_pretrained(adapter_name)base_model = AutoModelForCausalLM.from_pretrained( base_model_name, device_map="auto", torch_dtype=torch.float16,)model = PeftModel.from_pretrained(base_model, adapter_name)model.eval() system_prompt = """You are Pomona Agronomist Advisor.The model advises; Pomona policies authorize.Do not directly control actuators. Do not provide pesticide dosage.""" user_prompt = """Crop: tomatoSystem: greenhouseSensors: temperature=31.5 C, relative_humidity=45%, co2=380 ppm, substrate_ec=3.2 mS/cm, ph=6.8, ppfd=210 umol/m2/sQuestion: Why is plant stress elevated, and what should the operator review?""" prompt = ( f"<start_of_turn>user\n{system_prompt}\n\n{user_prompt}<end_of_turn>\n" f"<start_of_turn>model\n") inputs = tokenizer(prompt, return_tensors="pt").to(model.device)with torch.no_grad(): outputs = model.generate(**inputs, max_new_tokens=350, do_sample=False) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
See examples/ and prompts/ for more complete prompt templates and sample sensor payloads.
Recommended Output Shape
For production integrations, prefer structured advisory responses:
summary: concise crop-state interpretation.
likely_factors: environmental or nutrient drivers to investigate.
operator_checks: manual inspections or data-quality checks.
advisory_options: non-binding options for review.
policy_handoff: what Pomona policy services should validate before action.
safety_notes: any prohibited, uncertain, or escalation-worthy items.
Model and Data Notes
This repository documents an adapter-style advisor model trained for greenhouse and hydroponic agronomy language tasks. It should be evaluated in the target crop, climate, hardware, and policy environment before operational use.
Example domains include:
- Tomato greenhouse stress explanation.
- Hydroponic lettuce nutrient and climate review.
- Sensor quality and outlier interpretation.
- Growth-stage-aware advisory summaries.
Limitations
- Sensor readings can be noisy, missing, delayed, or miscalibrated.
- Agronomic responses vary by cultivar, growth stage, substrate, climate, facility design, and local practice.
- The model can produce plausible but incorrect recommendations.
- It does not know site-specific legal, label, worker-safety, food-safety, or certification requirements.
- It must not be used as the final authority for pesticide dosing, worker exposure decisions, or autonomous equipment control.
Repository Contents
CHANGELOG.md: documentation and release notes.
examples/: prompt and JSON examples for safe advisory use.
prompts/advisor_system_prompt.md: recommended system prompt.
metadata/pomona-model.yaml: model-card metadata for Pomona integration.
evals/eval_report.md: qualitative evaluation report and safety checks.
Project
This model is part of the Pomona project.
Related repositories:
- Model repo:
Okyanus/ai-pomona-agronomist-gemma4
- Dataset repo:
Okyanus/greenhouse-sensor-data
- Space:
ai-pomona/pomona-greenhouse-demo
Version Roadmap
v0.1.0: initial release
v0.1.1: model card and examples
v0.2.0: better training data
v0.3.0: tomato greenhouse evaluation
v0.4.0: safety-tuned version