I've been experimenting with merging prompts together, with a goal to write the full backend in a single prompt.
On the form:
> 1. Setup a flask web server
> 2. Add a /add endpoint
It works reasonably well, but it seems like it's loosing some precision in the prompts... The person that coined the term "prompt engineering" was right, it's really important to learn what words to use to get the AI to do exactly what you want it to do.
The utility of these prompts comes primarily from the fact that the AI is aware of a huge amount of context and can therefore infer what a prompt is "meant to do." If a prompter had to exhaustively specify the context it would be no different than coding in any normal programming language.
That context necessarily changes over time. The same sentence 10 years ago might easily have a different contextual meaning than it does today.
Prisma, Atlas, and OpenAPI-generator are similar, with increasing complexity of input and DSL, respectively.
I do like your point that context of natural language as input can change over time. I imagine it also would if trained on different source code, or even different target languages and technologies.
I'm thinking that these AI could be simplified if their target was one of these middle ground abstractions in a DSL, letting fewer (expert) humans write the code via templates
So while it could help blast out large swaths of code quickly, it still needs an expert at the wheel to be accountable for the changes to reviewers.
I'm not saying you're wrong, but can't you just ask the AI to include a comment explaining why it chose to apply CORS to the entire app? You can just keep asking it questions and maybe its reasoning would check out for most of them.
But the AI isn't reasoning... is it? Perhaps it could give an explanation, but you couldn't (currently) conflate that with any actual understanding of why it did what it did?
> beware: sometimes Codex writes code vulnerable to SQL injection. When that happens tough, I was able to prevent it by adding "safely" to the prompt.
Oops.
Anyway, is "the program" actually the prompts? Should that be committed into source control, so future you and others can figure out how the code was built? How long will it be until we can trust Codex enough that the Python code doesn't need to be committed? "Codex, create an Android CRUD UI for this OpenAPI document."
Did you have to correct output for the post?
https://github.com/sturdy-dev/codeball-todo-mvc/blob/main/ap...
https://github.com/sturdy-dev/codeball-todo-mvc/commit/17992...
The prompt used for the post seems to have been "before_first_request, before conn.close: if the tasks table is empty, add three rows"
I'm updating the post and the sources!
Is this closed? Beta? or .. ?
As a kid I used to dream to talk to the computer and it would make code happen as a repl. This appears to be close to it.
Now instead of spending years learning to do all that nasty troublesome coding you can just spend years learning to exactly phrase what you want the code generator to do. Wait.... is this an infinite loop joke?
Nothing against bootcampers, is's just that their output is non-intuitive...
I really want to see some examples of failed prompts and attempts to ask it to cache sqlite connections.
Got scared for a second (most of what I code is CRUD backends!), until I tried to see it from the perspective of a novice, where all of this is impenetrable anyway.