# Generating Functions with Prompts

> Source: <https://www.dotnetperls.com/2026_9_11_generating-functions-prompts>
> Published: 2026-09-11 07:00:00+00:00

I know that **agentic harnesses** are popular in software development these days. But they are not the only way to **generate code** with AI. If I have a specific function in mind, I will sometimes just **prompt** for it in **chat**, and then paste it in.

I have found this works well. And it is worth trying different LLMs—I have found that occasionally a **local model** like Gemma 4 can generate a better function than a cloud-based model.

It does make me realize that:

• For string manipulation, having an LLM generate a function is way easier and faster than writing one by hand.

• String manipulation (and similar) tutorials are probably not going to be that useful in the future.

It is possible to piece together a program with a chat bot's output, and for **some situations** this probably **works better** than an agentic harness. It allows me to do more work **locally**—which means I cannot have my account canceled.
