Urgent.News

What's breaking now, across thousands of outlets.

AI

I Let Free Web Gemini Code My Terrarium, and Now the Worms are Having an Identity Crisis

If you want to see Gemini building the most "biologically accurate" worms for my Terrarium simulation, please read till the end. I built a Pygame terrarium simulation a while back (please wait, the video may take a second to load): I decided to check whether free web-based LLMs can add entirely new features to this Python codebase without blowing everything up. No expensive subscriptions. Just a…

Title: Free Web Gemini Code My Terrarium Simulation, Worms Get Confused

A Python-based terrarium simulation project experienced some unexpected changes when free web-based Large Language Models (LLMs) were used to add new features to it.

The creator of the terrarium simulation built a Pygame-based model and decided to test if free web-based LLMs could add new features without causing any issues. They utilized Google AI Studio and Gemini, a free browser chatbot, to feed the codebase into the AI.

Initially, the creator added all files to Gemini's context, including README.md, requirements.txt, and Python files. However, Gemini asked for payment, so the creator decided to try feeding only the project structure, README, and requirements.txt first. They tried this approach on both Google AI Studio and Gemini's website, but Gemini cut off the context without warning.

Undeterred, the creator remembered their extension could write output to files. They uploaded the Python files and received 108 lines of diffs, indicating Gemini had indeed added new features. However, applying those diffs using the extension failed due to excessive hallucinations from Gemini.

The creator then adopted a new strategy: feed Gemini only the necessary project structure, README, and requirements.txt. They asked the AI which specific files it needed to read to implement the desired feature. Gemini provided a list of the files it required to analyze.

The creator was delighted with the results, as Gemini successfully identified the necessary files. However, there were instances where Gemini's hallucinations caused issues in applying the generated diffs. Overall, the experience demonstrated the potential of free web-based LLMs in enhancing Python codebases, but also highlighted the need for careful context management to avoid hallucinations and ensure accurate results.

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 AI

More from Monday 28 September →