This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine 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.
GitHub Link: https://github.com/Muen1/ghost-farmer.git Screenshots:
gemma3:1b, an open-weight model) running locally through ollama librarystories.txt file the ghost reads at startup, so every family gets a different ghost/save command 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.
MODEL = "gemma3:1b").
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.
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.