Hacker News new | ask | show | jobs
by JonAtkinson 1140 days ago
Does anyone have any examples of promoting to feed such a large amount of tokens? For example, would you use something like “I am going to send you an entire codebase, with the filename and path, followed by the file content. Here is the first of 239 files: …”
6 comments

I've had access to the 32k model for a bit and I've been using this to collect and stuff codebases into the context: https://github.com/mpoon/gpt-repository-loader

It works really well, you can tell it to implement new features or mutate parts of the code and it having the entire (or a lot of) the code in its context really improves the output.

The biggest caveat: shit is expensive! A full 32k token request will run you like $2, if you do dialog back and forth you can rack up quite the bill quickly. If it was 10x cheaper, I would use nothing else, having a large context window is that much of a game changer. As it stands, I _very_ carefully construct the prompt and move the conversation out of the 32k into the 8k model as fast as I can to save cost.

Do you use it for proprietary code and if so, you don’t feel weird about it ?
Not weirder than using Github, or Outlook or Slack or whatever.
I wouldn't feel weird about it. The risks - someone stealing know-how / someone finding a security hole - are negligible.
How it calculates the price? I thought that once you load the content (32k token request / 2$) it will remember the context so you can ask questions much cheaper.
It does not have memory outside the context window. If you want to have a back-and-forth with it about a document, that document must be provided in the context (along with your other relevant chat history) with every request.

This is why it's so easy to burn up lots of tokens very fast.

Here's someone that passed a 23 page congressional document:

https://twitter.com/SullyOmarr/status/1654576774976770048

I already do this with the current context limits. I include a few of my relevant source files before my prompt in ChatGPT. It work’s unreasonably well.

Something like the following

Here is the Template class:

Here is an example component:

Here is an example Input element:

I need to create another input element that allows me to select a number from a drop down between 1/32 and 24/32 in 1/32 increments

You could see the legal impact of your actions before you take them. You could template out an Operating system and have it fill in the blanks. You could rewrite entire literary arts, in the authors style, to cater to your reading style or story preferences.
I think what's more important is the end part of your prompt, which explains what was previously described and includes a request/question.
Sounds like a return to the days of download managers or file splitters :)