this post was submitted on 25 Jul 2023
320 points (100.0% liked)
Technology
37727 readers
563 users here now
A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.
Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.
Subcommunities on Beehaw:
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Half the time when I ask it for advice, ChatGPT recommends nonexistent APIs and offers examples in some Frankenstein code that uses a bit of this system and a bit of that, none of which will work. But I still find its hit rate to be no worse than Stack Overflow, and it doesn't try to humiliate you for daring to ask.
It depends on what sort of thing you're asking about. More obscure languages and systems will result in hallucinated APIs more often. If it's something like "how do I sort this list of whatever in some specific way in C#" or "can you write me a regex for such and such a task" then it's far more often right. And even when ChatGPT gets something wrong, if you tell it the error you encountered from the code it'll usually be good at correcting itself.
I find that if it gets it wrong in the first place, its corrections are often equally wrong. I guess this indicates that I've strayed into an area where its training data is not of good quality.
Yeah, if it's in a state where it's making up imaginary APIs whole cloth then in my experience you're asking it for help with something it just doesn't know enough about. I get the best results when I'm asking about popular stuff (such as "write me a python script to convert wav files to mp3" - it'll know the right APIs for that sort of task, generally speaking). If I'm working on something that's more obscure then sometimes it's better to ask ChatGPT for generalized versions of the actual question. For example, I was tinkering with a mod for Minetest a while back that was meant to import .obj models and convert them into a voxelized representation of the object in-game. ChatGPT doesn't know Minetest's API very well, so I was mostly asking it for Lua code to convert the .obj into a simple array of voxel coordinates and then doing the API stuff to make it Minetest-specific for myself. The vector math was the part that ChatGPT knew best so it did an okay job on its part of the task.
Your follow up question should be for ChatGPT to write those APIs for you.