Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do you make a custom gpt which knows a specific code base? I have been wanting to do this


You tune an existing model on your own set of inputs/outputs.

Whatever you expect to start typing, and have the model produce as output, should be those input/output pairs.

I'd start by using ChatGPT etc. to add comments throughout your code base describing the code. Then break it into pairs where the input is the prefacing comment, and the output is the code that follows. Create about 400-500 such pairs, and train a model with 3-4 epochs.

Some concerns: you're going to get output that looks like your existing codebase, so if it's crap, you'll create a function which can produce crap from comments. :-)


I use the new feature of creating a custom gpt and I keep adding new information ; files, structures etc by editing the gpt. It seems to work well.


Ah ok so you have to paste entire files in 1 by 1, you can't just add it locally somehow? too bad you cant just upload a zip or something...


you can upload zips. Make a new GPT and go to the custom settings.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: