This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
Ghost Farmer is an offline chatbot that channels the spirit of an ancestor farmer to answer questions about planting, soil, pests, and harvest. Growing up in Kenya, as a farmer's child, my grand father often gave us advice on how to take care of plants in order to ensure great yield so I chose to work on Agriculture because I saw how helpful it is.
Demo
GitHub Link: https://github.com/Muen1/ghost-farmer.git
Screenshots:
How I Built It
-
Gemma (
gemma3:1b, an open-weight model) running locally through Ollama -
Python with the
ollamalibrary - A
stories.txtfile the ghost reads at startup, so every family gets a different ghost - A
/savecommand that builds an "ofrenda" of advice worth keeping
The whole thing is one Python file of about 60 lines. A system prompt tells the model to speak like a gentle ghost farmer, keep answers short, stay practical, and admit when it isn't sure. The family memories from stories.txt are added to that prompt, and answers stream onto the screen word by word so it feels like the ghost is speaking.
What went wrong: I got stuck before I wrote any code. I tried to install Ollama with a command meant for PowerShell while I was in Git Bash, so it failed. Then the installer hung, and my terminal said ollama wasn't recognized. I switched to the regular Windows installer, opened a fresh terminal, and it worked. That taught me that local AI is not hard to run, but the setup can fight you if you are new to it.
What surprised me: the ghost started inventing his own backstory. When I asked about aphids, he told me about a "dreadful infestation" from his own farming days and called them "little green devils." I never wrote that anywhere. A tiny 1B-parameter model, running on my laptop with no internet, gave a made-up ghost a personality. It's not always accurate, which is why I told him in the prompt never to invent exact chemical doses, but for a ghost story it's the right kind of wrong.
Why Open Source Matters Here
- It works with no internet. Many farms have poor signal, and this runs entirely on a laptop.
-
Family stories stay on your own machine. Nothing in
stories.txtis sent to a server I don't control. -
It's free to run, and I can swap the model by changing one line (
MODEL = "gemma3:1b"). - It can't disappear if a service shuts down. The model and the code are on my computer, and whoever has them can keep the ghost alive.
A closed, cloud-based chatbot would need internet and an account, and would send private family stories to someone else's servers. For a project about preserving memories, that felt wrong.
How It Fits the Theme
DÃa de los Muertos honors those who came before us, and marigolds, the flower of the ofrenda, are a crop. For many families, the people we remember include farmers whose knowledge was never written down. Ghost Farmer is a small way to keep that knowledge speaking. You write down what your grandparents taught you, and a ghost carries it into the next season.


Top comments (0)