Inspiration

Smallholder farmers across Nigeria's Middle Belt face two compounding problems that existing tools don't solve together: farmer-herder conflict that can turn deadly when livestock stray onto farmland, and livestock health/market decisions made without reliable information. Cloud AI tools don't help — rural farms often lack consistent electricity and internet, so any solution depending on connectivity fails exactly when it's needed most.

What it does

AgroSentinel is an offline AI assistant that runs entirely on a standard laptop, no internet required. It reasons across two pillars:

  1. Farmer-herder conflict prevention — grounded in real documented Nigerian conflict data (state-level risk patterns, seasonal migration timing, root-cause research on water/crop-related triggers), it advises farmers on immediate steps when herders intrude and routes escalation appropriately.
  2. Livestock health + market advisory — combines verified veterinary disease signs (FMD, LSD, trypanosomiasis) with real Nigerian livestock market pricing and festival demand patterns (Sallah/Eid-el-Kabir), so a farmer asking "should I sell my sick ram before Sallah?" gets an answer that correctly prioritizes animal welfare and disease-spread risk over short-term profit — instead of a model just chasing the higher price.

How we built it

  • Qwen2.5-3B-Instruct, quantized to GGUF Q4_K_M, running via llama.cpp — no fine-tuning, stock weights only.
  • Offline RAG over a 13-document corpus we sourced and wrote ourselves: real Nigerian state-level conflict data, veterinary disease signs, agroecological/NDVI baselines, staple crop calendars, and livestock market pricing — all grounded in cited sources, not fabricated.
  • ChromaDB for local vector retrieval, sentence-transformers for embeddings.
  • Deterministic-first architecture: price estimates are calculated by the application layer, not invented by the LLM — the model's job is synthesis and explanation, not acting as a database.
  • Iteratively debugged real retrieval failures (a mis-chunked document was causing the model to miss critical disease signs) and fixed them by restructuring the corpus for tighter, single-topic chunks.

Challenges we ran into

Getting reliable retrieval on a small 3B model with a small corpus took real iteration — we caught and fixed a case where the system failed to retrieve the correct disease-sign document and instead let the model guess (inventing a wildly wrong price and misrouting the alert). Rebuilding that document into shorter, single-topic chunks fixed it completely, confirmed through direct retesting.

Accomplishments we're proud of

Real, measured performance via the official ADTC profiler — not estimates:

  • Throughput: 8.81 tokens/sec
  • Peak RAM: 3.23 GB (well under the 7GB budget)
  • Zero thermal throttling
  • ARC-Easy accuracy: 0.78

What's next

African-language output (Hausa, Pidgin, Yoruba, Igbo) via a template-based translation layer is architected into the design as a near-term addition. Live IoT sensor integration (fence CV IoT monitoring/IoT neck collar for health temperature and movement checks/geofencing — currently designed and simulated) and lightweight crop-disease image classification are also planned.

Built with: chromadb, python, llama.cpp, qwen2.5, rag, gguf,

Built With

  • chroma-db
  • gguf
  • llama.cpp
  • local
  • python
  • quantized
  • qwen
  • rag
  • sentence-transformers
Share this project:

Updates