Urgent.News

What's breaking now, across thousands of outlets.

Tech

Ghost Farmer: An offline Ancestor Farmer powered by Gemma

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…

This submission, titled "Ghost Farmer," is an offline chatbot designed to provide advice on farming, soil care, pests, and harvest. The inspiration for the project stems from the narrator's upbringing in Kenya and their grandfather's farming advice. The chatbot, named Ghost Farmer, utilizes the Gemma 3:1B open-weight model, which runs locally through the Ollama library on Python.

The foundation of the chatbot lies in a text file named "stories.txt," which contains the family's memories and advice. Upon startup, the ghost reads from this file, ensuring that each family gets a unique experience. The inclusion of a "/save" command allows users to store valuable advice for future reference.

The entire project is coded in a single Python file with approximately 60 lines of code. The system prompt instructs the model to communicate as a gentle ghost farmer, keeping answers concise, practical, and honest when it's uncertain about the information. The family's memories from "stories.txt" are incorporated into the system prompt, which facilitates a conversation that feels like the ghost is speaking.

Before working on the project, the narrator faced technical difficulties while attempting to install Ollama. A misstep in the installation process led to confusion and frustration, but switching to the standard Windows installer proved successful. This experience highlights that local AI implementation can be manageable, though setup can be challenging for beginners.

As the chatbot began its operation, the narrator was surprised by the ghost's ability to fabricate its own backstory. For example, when asked about aphids, the ghost recounted a real-life infestation from its farming days, referring to them as "little green devils." Despite not being explicitly programmed with this information, the 1B-parameter model managed to create a charming and somewhat inaccurate personality for the ghost.

The narrator emphasized that while the model isn't always accurate, its invented details are suitable for a ghost story.

Open source technology plays a crucial role in the project's success, as it functions without an internet connection. Many farms have limited connectivity, making the offline accessibility of the chatbot essential. The project ensures that family stories remain private by not sending any data from the "stories.txt" file to external servers.

It's a free-to-use tool that allows users to modify the model by changing a single line in the code (MODEL = gemma3:1b). The project's resilience is also noteworthy, as the model and code can be preserved even if a service shuts down.

Overall, "Ghost Farmer" embodies the spirit of Día de los Muertos, honoring ancestors and their knowledge. The chatbot serves as a means to preserve family memories and the wisdom passed down by farmers who often lack formal documentation. Through this simple yet profound project, the narrator aims to keep the knowledge of their ancestors speaking in the seasons to come.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Amazon ECS Gateway: Beanstalk for ingress for your ECS services

If you've ever published a service on ECS, you know the list: an Application Load Balancer, a listener, a target group, a certificate on ACM, security groups, maybe a web ACL from WAF, and getting…

  • Amazon ECS Gateway, announced Oct 20, 2026, simplifies HTTPS access to ECS services.
  • Gateway automatically configures infrastructure and creates HTTPS entry for each service.

How does a network know it's wrong?

Loss functions turn every mistake into one number. Here's how squared and absolute loss score the same misses very differently. A neural network can't feel embarrassed when it's wrong.

  • Network learns by minimizing a single number from loss function
  • Squared loss highly sensitive to large errors
  • Absolute loss less sensitive to outliers

More from Saturday 31 October →