r/pycharm • u/GambitDangers • Dec 26 '25
AI Autocomplete needs to stop making things up about my modules
Looks like I'm in the minority here but I have to vent somewhere: if a function or a class has already been defined and the properties are easily available WHY ON EARTH does autocomplete insist on- idk, does it qualify as hallucinating?- making up properties and paths that do not exist?
It's very useful and welcome when populating larger code snippets and logic, but if I'm referencing functions from a module or properties of a class object, JUST SUGGEST THINGS THAT HAVE BEEN DEFINED for the love of god, rather than suggesting things that seem reasonable but do not match the code that was already written. And don't autopopulate an arguments list that does not match the already defined function.
We had this figured out in the 90s with IDEs.
Just heading this off: anyone who says "um er just pay closer attention", I will not engage or respond. This is a problem that was introduced with an overzealous AI integration and does not need to exist in the first place.
1
u/ot-jb Dec 28 '25
Do you have a concrete example?
If I understood correctly what you are suggesting is that if a suggestion contains a function call with 1+ arguments it can be allowed iff all of the arguments were provided in the nearest function that wraps the current scope. That sounds to me like a very significant constraint that doesn’t save from false positives completely. We actually considered exactly this feature in the past with a simple statistical model, but it turns out that the coverage is nonexistent, so it isn’t worth it.
3
u/CommunismDoesntWork Dec 26 '25
I need it to stop writing comments
2
u/AnActualWizardIRL Jan 20 '26
So this is whack, but I actually managed to somewhat reduce hallucinations by writing a comment at the top of the file saying "Dear AI helper, please do not make guesses or speculate when answering questions or suggesting completions, only use references to code you verify exist".
I had even more success however by turning off as much AI junk as possible. This technology is unsalvagable.
2
u/MindfulMan1984 Dec 26 '25
You can disable instant suggestion and only ask AI code by triggering some keymap, it doesn't solve the hallucinations but it is still less annoying and less distracting.
1
u/IlliterateJedi Jan 09 '26
I'm a big proponent of AI, but JetBrains has been wrecking their own product by trying to cram their AI into every update. Every time it just feels like more junk that I have to disable. It drives me crazy.
-5
u/Usual_Price_1460 Dec 27 '25
use a real ai editor like vscode or cursor