Live data from Hacker News

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

github.com

21–30 of 162 posts

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

#22
post #7
post #3

How much text can you feed GPT-4? Our codebase is 1 million lines of code. Can we feed the documentation to it? What are the limits? Is it possible to train it on our data without doing prompt engineering? How? Otherwise are we supposed to use embeddings? Can someone explain how these all work and the tradeoffs?

I'm waiting on my GPT-4 API access so I can use gpt-4-32k which maybe can soak up 10k LOC? Clearly this will break eventually, but I am playing around with some ideas to extend how much context I can give it. One is to do something like base64 encode file contents. I've seen some early success that GPT-4 knows how to decode it, so that'll allow me to stuff more characters into it. I'm also hoping that with the use of…

Base64 encoding increases the size of text by 4/3. Like the other commenter asked, I wonder if another encoding could work

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

#24
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…

It's just so slow for the autocompletion use case to do it like that. Ideally, you're never chaining serial requests to the LLM. Even if you do stuff in all the data into a single prompt, the execution time seems to be superlinear with the number of tokens, again getting super slow.

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

#25
post #3

How much text can you feed GPT-4? Our codebase is 1 million lines of code. Can we feed the documentation to it? What are the limits? Is it possible to train it on our data without doing prompt engineering? How? Otherwise are we supposed to use embeddings? Can someone explain how these all work and the tradeoffs?

I've been wondering if you could use something like llama-chain's tree summarization, but modified to be aware of inter-module dependencies: https://gpt-index.readthedocs.io/en/latest/guides/index_guid...

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

#28

Before anyone working on commercial code bases thinks to use this, stop. Uploaded code becomes part of OpenAI.

I always think about this when using a free online prettifier, decoder, and the like. But I'm sure people use those things with code/secrets from work without really considering it, and I think those habits will carry right over to AI chat.
Post reply on HN