Inspiration Nigeria's groundnut farmers in the Sudan and Guinea savanna zones face a silent crisis: fertilizer costs have tripled since subsidy removal, yet most smallholders apply fertilizer by guesswork rather than agronomic recommendation. During a need assessment for an Enactus ABU project (AquaFert, runner-up at ISEC ABU), my team discovered that farmers routinely over-apply nitrogen to groundnut — a legume that fixes its own nitrogen — wasting money and degrading soil. The information exists. ICRISAT and IAR Zaria have published precise extension guides. But no farmer in Kaduna or Katsina can access them offline, in real time, when they need them.
What I Built Naija Farmers Northstar is a fully offline agricultural advisory system for Nigerian smallholder groundnut farmers. It runs Phi-3 Mini (3.82B parameters, Q4_K_M quantization) via llama.cpp on a standard 8GB laptop with no cloud dependency. A RAG pipeline built with LlamaIndex retrieves context from ICRISAT/IAR Zaria/FMARD extension documents and feeds it to the model at inference time, grounding every answer in peer-reviewed Nigerian agricultural research.
What I Learned Quantization tradeoffs: Q4_K_M gives the best accuracy/RAM balance at 2.3GB loaded RAG is not optional for domain accuracy — without it, the model hallucinated fertilizer rates that were 5x too high CPU inference on 8GB integrated graphics is viable but requires careful memory management
Challenges Built entirely on a non-standard Dell laptop (Intel i5-4300M, 8GB RAM, Windows 10 with WSL2) — no GPU, no fiber, intermittent power PDF corpus extraction failed on scanned documents — solved by sourcing the ICRISAT guide in DOCX format directly Model hallucination on fertilizer rates required architectural fix: isolated knowledge chunks per topic rather than one large document
Built With
- agriculture
- gguf
- huggingface
- llamaindex
- natural-language-processing
- phi-3
- put-it-on-a-straight-line-llama.cpp
- python
- rag
- ubuntu
- wsl2


Log in or sign up for Devpost to join the conversation.