by ftufek · 3y ago · 0 comments
The initial prompt would be, "person wants to do x, here are the file list of this repo: ...., give me a list of files that you'd want to edit, create or delete" -> take the list, try to fit the contents of them into 32k tokens and re-prompt with "user is trying to achieve x, here's the most relevant files with their contents:..., give me a git commit in the style of git patch/diff output". From playing around with it today, I think this approach would work rather well and can be like a huge step up from AI line autocompletion.
https://github.com/jerryjliu/llama_index
and/or
Edit: This, btw, is also the reason why I think that this here popped up on the hackernews frontpage a short while ago: https://github.com/pgvector/pgvector
When giving a prompt, the prompt causes the crawling of many APIs to build the response - the power of such activity/features, will be scary power-to-authoratarian goals.
Imagine if the prompt is "Select all users who have political beliefs, posts, comments, links from APIs A, B, C, etc where sentiment appears to dissent from [party line]"
Sam Altman takes comfort in the thought that their AI does nothing without a human prompting it, so it has a human in the loop, as a circuit breaker if you will.
This assumption is rapidly becoming a mere hope, as right now probably hundreds of developers are working on systems which, when put into production and connected to other systems, might just come down to: the AI is calling itself, and giving itself orders.
I'm happy to wait even 30-60 seconds for this which I can easily evaluate, criticize (and the model will correct it) and then proceed to just patch and move on. I think the results from this will be much better with the 32k model, but remains to be seen.
It's best illustrated by the old joke:
A programmer's wife told him "Go to the store and buy milk and if they have eggs, get a dozen." He came back a while later with 12 cartons of milk.
A good chunk of all bugs in software are down to the requirements being insufficiently well specified. Further, many bugs are the discovery of new requirements when informal specification encounters reality."Read from standard input into this byte array" doesn't specify what to do when the input exceeds the byte array.
When you overflow the buffer, you get a "well obviously you're supposed to not do that"... that's wasn't stated at all.
When the function keeps going after a newline or a null byte or whatever, there's another "well obviously you're supposed to stop at those points". That was also not specified.
and so on.
At the point you're specifying all these cases and what to do when, it's so specific and stilted, you might as well be using a programming language.
(We already program in English, in a sense, when we tell humans what we want, and they go code it. Now we'll just be telling machines.)
Originally as formulaic syllogisms and Aristotelian logic, but then onto other forms of codified language, formal logic etc.
Adding more words often makes things less clear, not more so. What you need is well-defined terms with no overloaded meaning.
> (We already program in English, in a sense, when we tell humans what we want, and they go code it. Now we'll just be telling machines.)
Humans get it wrong all the time though. A great many bugs arise from quite simply misinterpreting the requirements. Which leads to requirements becoming more formulaic and resembling a programming language.
You... might wanna consider a self hosted alternative for that use case, or at least do like, a `| wc` to get an idea of what you're potentially sending before calling the api.
[1] - https://help.openai.com/en/articles/7127956-how-much-does-gp...