DEV Community

Cathy Lai
Cathy Lai

Posted on

Why My AI Garden Makeover App Kept Generating Hotel Instead of Home Gardens

Now I've got the GUI of the app, it's time to "program" the prompt! Without much knowledge, I treated the prompt exactly like an API call. I uploaded a photo of a messy yard, and start typing the prompt.

The Sample Before Image

Messy garden

After a set of instructions (add lawns, furniture, mulch, native evergreen shrubs, furniture, and solar and string lights), I have got this

Improved but washed out

It looks okay, but the texture feels washed out and uninviting... I have tried several other examples, and they all had the same problem. No matter how many times I asked it to add vibrant lawns, nice lighting, it gave me worn out lawns, washed out feeling, grey sky, and may or may not include lighting...

How About Just Describe the "Mood"??

So I asked GPT how to solve this problem? It told me that I should just describe the "mood", eg. homely, motel-like, morning sun, neat, tidy, simple, and elegant. And let it arrange the objects. So I've got something like this:

Hotel like

Looks better... however it is too much like a neat hotel, a concrete jungle, and the materials look expensive with a lot of construction work. I keep asking it to be "homely", "affordable"; but it seems to ignore those.

The Real Meaning of Prompt

So I started from scratch, using another model (Gemini) and describe the project and the problems I encountered.

Gemini told me something surprising...! That is Prompt engineering is not programming. I had my mental model wrong all along.

The Probabilistic Compiler vs. Latent Space

When I write traditional code, I am issuing commands to a deterministic CPU. When I prompt, I am interacting with a statistical weight matrix.

The AI doesn't compile my text instructions; it navigates a massive, multi-dimensional mathematical map of human concepts called latent space.

Every word, phrase, and visual style in the model's training data lives on this map as a set of coordinates. Concepts that are similar sit in the same geographic neighborhood.

My prompt isn't an imperative command—it is a vector coordinate pulling the generator toward a specific statistical zip code.

The Taxi Analogy:

  • Traditional coding is giving a driver exact GPS coordinates: "Drive 400 meters, turn left, park at Spot #42." The outcome is identical every time.

  • Prompting is calling a cab and saying: "Take me somewhere cozy in the Arts District." Because the neighborhood is huge, the driver drops me off at a completely different alleyway every single time.

Both spots technically fit my description, but the visual layout changes entirely. If I leave my prompt loose, the model wanders around that neighborhood, causing the massive variance I see.

My Solution: Structuring the "Config File"

The fix for me was to pass the AI a clean, structured pseudo-schema rather than a paragraph of text. By defining strict parameters, I forced spatial and material continuity.

Here is the structured approach that finally tamed the variance for me:

[Environment Map]: Use the uploaded backyard photo strictly for spatial boundary context.
[Style Const]: Bright morning sunlight, high-contrast architectural photography, homely vibe.
[Financial Guardrails]: Show only low-cost, DIY-friendly materials. 
  - ALLOW: Dark bark mulch, timber edging, river gravel.
  - EXCLUDE: Masonry, expensive stone pavers, structural retaining walls.
Enter fullscreen mode Exit fullscreen mode

Why this works:

  • Locks the Environment: Defining the lighting and camera angle upfront eliminates the AI's tendency to randomly shift from midday sun to moody twilight.

  • Hardcodes the Constraints: Instead of letting the AI guess what "low budget" means, I explicitly whitelist cheap materials (mulch, gravel) and blacklist expensive ones (paving, walls).

By shifting my mindset from "solving a spatial puzzle with code" to "setting strict boundary parameters on a statistical matrix," I stopped fighting the randomness and started leveraging the inspiration.

The Result

Correct result

It is much closer to the homeliness I wanted, with inspiring lighting, vibrant lawns, low maintenance shrubs, and achievable garden beds.

Top comments (0)