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

Does it seem to only understand imports of public libraries? If so, it's likely that, rather than understanding the contents of those libraries, it's learning from others' use of those library APIs. If not, it is likely just understanding the words in the API at a shallow depth.


No, it's imports from other files in my project. It's either using the import or the fact that I have another tab open.

There are definitely times where it produces a close approximation that's obviously just statistical, but there are other times where there's no question that it picked up something from a different source file that couldn't have possibly been in its training set.

I haven't yet decided if it's using imports or opened files in the editor, but it's definitely not just using the single file I have active.


It could be doing some "fine tuning" based on the repo. That would be cool! That said, what I meant when referring to 'understanding' the non-local nature of code was in a more principled way.

For example, if an object defined in another file has a function called `rename` that takes zero arguments, when calling it from another file Copilot will likely suggest arguments if there are variables like `old` and `new` near the cursor, even though `rename` actually doesn't take any, just because functions called `rename` typically take arguments. This behavior is in contrast to a tool like an IDE that can trace through the way non-local code references work.




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

Search: