|
|
|
|
|
by ravi-delia
1284 days ago
|
|
In learning to predict the next token, the model has to pick up lots of little bits of world knowledge. I'm sure someone would disagree with the phrasing of "understand", but it certainly operates with more complexity than, say, a markov chain. It has seen lots of python, and in order to predict better, it has developed internal models of how python works. Think of how much better you'd do predicting the next character of python code compared to random noise- there's a lot of structure there. |
|
What surprised me was the level of "understanding" it seems to do when providing it with some of my own sample code. It can analyze the code, explain how it works/what it does, use libraries, suggest improvements and apply those improvements.
Have a look at this conversation: https://imgur.com/a/ZtViC3d
While the end result isn't perfect, it's still highly impressive and while I was an AI-skeptic before, I now see the possible benefits of AI assistants for programming.
Some other prompts with very impressive results:
* "Write an implementation for the following Kotlin repository interface: <insert-interface-with-full-type-signatures>."
* (followup) "Add save/load methods that store the backing map in a JSON file"
* (followup) "Replace Gson with Jackson for JSON serialization"
* "Write an Android layout xml for a login form with username/password/loginbutton"
* (followup) "Provide the Kotlin activity code for this layout"
* "Write a Kotlin function that parses a semver input string into a data class"