Hacker News new | ask | show | jobs
by vidarh 1175 days ago
The fun part is when it hallucinates a library like that and it's simple enough that you can ask it to implement it from its own usage examples. I got that working with a Sequel (Ruby ORM) plugin that it insisted existed that didn't - the implementation I asked it for only needed a couple of minor tweaks.
1 comments

I got it to write a Python module that would intercept calls to missing functions, create the missing function based on the name and calling parameters, write the function to a new .py file, modify the file that called the missing function to import the new file, then execute the new function and return without error.

It was very unhappy about doing so; I had to stress that it was just for research in the prompt to avoid it flat out refusing to write self-modifying code. But it worked!

That makes me wonder where you can go if combining GPT with Koza et.al's genetic programming research, to instead of doing "blind" mutation and crossover, let GPT do targeted changes at high temperature, driven by knowing the goal, and pit different runs against each other.