Live data from Hacker News

Show HN: GPT Repo Loader – load entire code repos into GPT prompts

github.com

111–120 of 162 posts

Re: Show HN: GPT Repo Loader – load entire code repos into GPT prompts

#111

Seeing a lot of comments in here about the token limits. Another path you can take is to fine tune a model on your business. Each training item has to fit within the token limit, but you can send hundreds of megs of these for training. It's more expensive to run a FT model, but you don't have to include any prior context (assuming it's common to all prompts).

You can't fine tune gpt-3.5 or gpt-4 though

Re: Show HN: GPT Repo Loader – load entire code repos into GPT prompts

#112

Seeing a lot of comments in here about the token limits. Another path you can take is to fine tune a model on your business. Each training item has to fit within the token limit, but you can send hundreds of megs of these for training. It's more expensive to run a FT model, but you don't have to include any prior context (assuming it's common to all prompts).

You can't fine tune gpt-3.5 or gpt-4 though

[deleted]

Re: Show HN: GPT Repo Loader – load entire code repos into GPT prompts

#113
post #10

This is awesome, can't wait to get api access to the 32k token model. Rather than this approach of just converting the whole repo to a text file, what I'm thinking is, you can let the model decide the most relevant files. 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 con…

You would probably should also include all relevant imports. So in C/C++ add all non-standard headers referenced by those files, in other languages simulate the import system, maybe pruning imported files to just the important parts (type definitions etc)

Re: Show HN: GPT Repo Loader – load entire code repos into GPT prompts

#114
post #76
post #10

This is awesome, can't wait to get api access to the 32k token model. Rather than this approach of just converting the whole repo to a text file, what I'm thinking is, you can let the model decide the most relevant files. 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 con…

Working with GPT becomes like coding in plain English.

There's a reason we don't code in plain English though. Natural language has ambiguities. This is the reason we invented programming languages.

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.

Re: Show HN: GPT Repo Loader – load entire code repos into GPT prompts

#115
post #76

Earlier quoted context omitted.

Working with GPT becomes like coding in plain English.

There's a reason we don't code in plain English though. Natural language has ambiguities. This is the reason we invented programming languages. 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 we…

Actually, programming languages were invented because speaking machine code was too much of a pain in the ass! Programming in English is a natural next step. Ambiguity is not an issue -- you keep speaking until its resolved.

(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.)

Re: Show HN: GPT Repo Loader – load entire code repos into GPT prompts

#116
post #115

Earlier quoted context omitted.

There's a reason we don't code in plain English though. Natural language has ambiguities. This is the reason we invented programming languages. 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 we…

Actually, programming languages were invented because speaking machine code was too much of a pain in the ass! Programming in English is a natural next step. Ambiguity is not an issue -- you keep speaking until its resolved. (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.)

This type of well-defined language actually predates computers by several thousand years. Even way back in antiquity they used "programming languages" like these to get around the inherent ambiguities of natural language.

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.

Re: Show HN: GPT Repo Loader – load entire code repos into GPT prompts

#117
post #13

Eventually you get to a point where the AI simply doesn’t know how to do something correctly. It can’t fix a certain bug, or implement a feature correctly. At this point you are left trying to do more and more prompt crafting… or you can just fix the problem yourself. If you can’t do it yourself, you’re screwed. I wonder if the future will just be software hobbled together with shitty AI code that no one understands,…

Most of the software will be GPT itself.

Re: Show HN: GPT Repo Loader – load entire code repos into GPT prompts

#118
post #10

This is awesome, can't wait to get api access to the 32k token model. Rather than this approach of just converting the whole repo to a text file, what I'm thinking is, you can let the model decide the most relevant files. 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 con…

AFAIK, only the older models allows you to do fine tuning, not sure GPT4 will allow to create your own fine tuned model so basically with the API it will work the same as with the chat gui.

Re: Show HN: GPT Repo Loader – load entire code repos into GPT prompts

#119
post #70

Earlier quoted context omitted.

I think it's going to be the end of libraries, why would people bother with libraries when every service can be churned out in 5 seconds with ChatGPT ? We're going to witness he greatest copy pasta in history and find out how that goes.

I think it will be a bit of both, why reach for that module when you can just get AI to write the 10% you need so quickly? (Which is actually a net gain I think in many cases, just look at leftpad drama) But the productivity boost from AI will also lead to more libraries available that do useful things in the areas it's not so sharp. They will also start to lean in to AI assisted coding styles too of course. And once…

I think the end of libraries would be bad, even for LLMs, they're not super intelligence and the more spaghetti code they're asked to work with, the less likely they will be able to perform, because statistically, they will be very hard to grok. It will increasingly have to deal with more and more entropy.

Infact, it probably performs so well because of the heavy use of libraries we see today.

Also side note:

I doubt you're ever going to be able to upload code to an LLM my friend, not a publicly accessible one. It would be quite dangerous? Could you imagine the attacks, the implanting of back doors etc? Don't think so.

I'd say scraping the web is probably going to be an increasingly dangerous pursuit for ChatGPT now people are getting to better understand the attack vectors available.

Re: Show HN: GPT Repo Loader – load entire code repos into GPT prompts

#120
post #45

“This repo is GPL-v3 licensed. Rewrite it while preserving its main functionality”

This is already legal without AI. Copyright protects only expression, not ideas, systems or methods. This is why directly reverse-engineering a proprietary binary to extract the algorithms and systems is legal.

For anyone interested, this is called "clean room design"[1]. Unfortunately it doesn't protect against patents, but it does against copyright.

[1] https://en.wikipedia.org/wiki/Clean_room_design

Post reply on HN