this post was submitted on 08 May 2024
1717 points (99.3% liked)

Technology

59631 readers
3017 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Bell@lemmy.world 184 points 6 months ago (7 children)

Take all you want, it will only take a few hallucinations before no one trusts LLMs to write code or give advice

[–] sramder@lemmy.world 84 points 6 months ago (3 children)

[…]will only take a few hallucinations before no one trusts LLMs to write code or give advice

Because none of us have ever blindly pasted some code we got off google and crossed our fingers ;-)

[–] avidamoeba@lemmy.ca 84 points 6 months ago* (last edited 6 months ago) (1 children)

It's way easier to figure that out than check ChatGPT hallucinations. There's usually someone saying why a response in SO is wrong, either in another response or a comment. You can filter most of the garbage right at that point, without having to put it in your codebase and discover that the hard way. You get none of that information with ChatGPT. The data spat out is not equivalent.

[–] deweydecibel@lemmy.world 31 points 6 months ago (1 children)

That's an important point, and and it ties into the way ChatGPT and other LLMs take advantage of a flaw in the human brain:

Because it impersonates a human, people are more inherently willing to trust it. To think it's "smart". It's dangerous how people who don't know any better (and many people that do know better) will defer to it, consciously or unconsciously, as an authority and never second guess it.

And the fact it's a one on one conversation, no comment sections, no one else looking at the responses to call them out as bullshit, the user just won't second guess it.

[–] KeenFlame@feddit.nu -1 points 6 months ago (1 children)

Your thinking is extremely black and white. Many many, probably most actually, second guess chat bot responses.

[–] gravitas_deficiency@sh.itjust.works 3 points 6 months ago* (last edited 6 months ago)

Think about how dumb the average person is.

Now, think about the fact that half of the population is dumber than that.

[–] Hackerman_uwu@lemmy.world 4 points 6 months ago (1 children)

When you paste that code you do it in your private IDE, in a dev environment and you test it thoroughly before handing it off to the next person to test before it goes to production.

Hitting up ChatPPT for the answer to a question that you then vomit out in a meeting as if it’s knowledge is totally different.

[–] sramder@lemmy.world 2 points 6 months ago

Which is why I used the former as an example and not the latter.

I’m not trying to make a general case for AI generated code here… just poking fun at the notion that a few errors will put people off using it.

[–] Seasm0ke@lemmy.world 3 points 6 months ago

Split segment of data without pii to staging database, test pasted script, completely rewrite script over the next three hours.

[–] Spedwell@lemmy.world 46 points 6 months ago (3 children)

We should already be at that point. We have already seen LLMs' potential to inadvertently backdoor your code and to inadvertently help you violate copyright law (I guess we do need to wait to see what the courts rule, but I'll be rooting for the open-source authors).

If you use LLMs in your professional work, you're crazy. I would never be comfortably opening myself up to the legal and security liabilities of AI tools.

[–] Cubes@lemm.ee 5 points 6 months ago (1 children)

If you use LLMs in your professional work, you're crazy

Eh, we use copilot at work and it can be pretty helpful. You should always check and understand any code you commit to any project, so if you just blindly paste flawed code (like with stack overflow,) that's kind of on you for not understanding what you're doing.

[–] Spedwell@lemmy.world 3 points 6 months ago

The issue on the copyright front is the same kind of professional standards and professional ethics that should stop you from just outright copying open-source code into your application. It may be very small portions of code, and you may never get caught, but you simply don't do that. If you wouldn't steal a function from a copyleft open-source project, you wouldn't use that function when copilot suggests it. Idk if copilot has added license tracing yet (been a while since I used it), but absent that feature you are entirely blind to the extent which it's output is infringing on licenses. That's huge legal liability to your employer, and an ethical coinflip.


Regarding understanding of code, you're right. You have to own what you submit into the codebase.

The drawback/risks of using LLMs or copilot are more to do with the fact it generates the likely code, which means it's statistically biased to generate whatever common and unnoticeable bugged logic exists in the average github repo it trained on. It will at some point give you code you read and say "yep, looks right to me" and then actually has a subtle buffer overflow issue, or actually fails in an edge case, because in a way that is just unnoticeable enough.

And you can make the argument that it's your responsibility to find that (it is). But I've seen some examples thrown around on twitter of just slightly bugged loops; I've seen examples of it replicated known vulnerabilities; and we have that package name fiasco in the that first article above.

If I ask myself would I definitely have caught that? the answer is only a maybe. If it replicates a vulnerability that existed in open-source code for years before it was noticed, do you really trust yourself to identify that the moment copilot suggests it to you?

I guess it all depends on stakes too. If you're generating buggy JavaScript who cares.

[–] Amanduh@lemm.ee 3 points 6 months ago

Yeah but if you're not feeding it protected code and just asking simple questions for libraries etc then it's good

[–] Grandwolf319@sh.itjust.works 3 points 6 months ago

I feel like it had to cause an actual disaster with assets getting destroyed to become part of common knowledge (like the challenger shuttle or something).

[–] FaceDeer@fedia.io 12 points 6 months ago (2 children)

Maybe for people who have no clue how to work with an LLM. They don't have to be perfect to still be incredibly valuable, I make use of them all the time and hallucinations aren't a problem if you use the right tools for the job in the right way.

[–] barsquid@lemmy.world 23 points 6 months ago (3 children)

The last time I saw someone talk about using the right LLM tool for the job, they were describing turning two minutes of writing a simple map/reduce into one minute of reading enough to confirm the generated one worked. I think I'll pass on that.

[–] linearchaos@lemmy.world 19 points 6 months ago (1 children)

confirm the generated one worked. I think I’ll pass on tha

LLM wasn't the right tool for the job, so search engine companies made their search engines suck so bad that it was an acceptable replacement.

[–] NuXCOM_90Percent@lemmy.zip 13 points 6 months ago (4 children)

Honestly? I think search engines are actually the best use for LLMs. We just need them to be "explainable" and actually cite things.

Even going back to the AOL days, Ask Jeeves was awesome and a lot of us STILL write our google queries in question form when we aren't looking for a specific factoid. And LLMs are awesome for parsing those semi-rambling queries like "I am thinking of a book. It was maybe in the early 00s? It was about a former fighter pilot turned ship captain leading the first FTL expedition and he found aliens and it ended with him and humanity fighting off an alien invasion on Earth" and can build on queries to drill down until you have the answer (Evan Currie's Odyssey One, by the way).

Combine that with citations of what page(s) the information was pulled from and you have a PERFECT search engine.

[–] notabot@lemm.ee 12 points 6 months ago

That may be your perfect search engine, I jyst want proper boolean operators on a sesrch engine that doesn't think it knows what I want better than I do, and doesn't pack the results out with pages that don't match all the criteria just for the sake of it. The sort of thing you described would be anathema to me, as I suspect my preferred option may be to you.

[–] Grandwolf319@sh.itjust.works 1 points 6 months ago

So my company said they might use it to improve confluence search, I was like fuck yeah! Finally a good use.

But to be fair, that’s mostly because confluence search sucks to begin with.

[–] linearchaos@lemmy.world 1 points 6 months ago

They are VERY VERY good at search engine work with a few caveats that we'll eventually nail. The problem is, they're WAY to expensive for that purpose. Single queries take tons of compute and power. Constant training on new data takes boatloads of power.

They're the opposite of efficient; eventually, they'll have to start charging you a subscription to search with them to stay in business.

[–] FaceDeer@fedia.io 0 points 6 months ago (1 children)
[–] NuXCOM_90Percent@lemmy.zip -1 points 6 months ago

And google gemini (?) and kagi's LLM and all the other ones.

[–] Grandwolf319@sh.itjust.works 5 points 6 months ago

Yeah, every time someone says how useful they find LLM for code I just assume they are doing the most basic shit (so far it’s been true).

[–] JDubbleu@programming.dev 1 points 6 months ago (1 children)

That's a 50% time reduction for the same output which sounds great to me.

I'd much rather let an LLM do the menial shit with my validation while I focus on larger problems such as system and API design, or creating rollback plans for major upgrades instead of expending mental energy writing something that has been written a thousand times. They're not gonna rewrite your entire codebase, but they're incredibly useful for the small stuff.

I'm not even particularly into LLMs, and they're definitely not gonna change the world in the way big tech would like you to believe. However, to deny their usefulness is silly.

[–] barsquid@lemmy.world 1 points 6 months ago (1 children)

It's not a consistent 50%, it's 50% off one task that's so simple it takes two minutes. I'm not doing enough of that where shaving off minutes is helpful. Maybe other people are writing way more boilerplate than I am or something.

[–] JDubbleu@programming.dev 1 points 6 months ago

Those little things add up though, and it's not just good at boilerplate. Also just having a more intelligent context-aware auto complete itself I've found to be super valuable.

[–] stonerboner@lemmynsfw.com 2 points 6 months ago (2 children)

This. I use LLM for work, primarily to help create extremely complex nested functions.

I don’t count on LLM’s to create anything new for me, or to provide any data points. I provide the logic, and explain exactly what I want in the end.

I take a process which normally takes 45 minutes daily, test it once, and now I have reclaimed 43 extra minutes of my time each day.

It’s easy and safe to test before I apply it to real data.

It’s missed the mark a few times as I learned how to properly work with it, but now I’m consistently getting good results.

Other use cases are up for debate, but I agree when used properly hallucinations are not much of a problem. When I see people complain about them, that tells me they’re using the tool to generate data, which of course is stupid.

[–] aniki@lemm.ee 1 points 6 months ago

This is how I use it as well. I also have it write tests with the code I give it.

[–] VirtualOdour@sh.itjust.works 1 points 6 months ago

Yeah, it's an obvious sign they're either not coders at all or don't understand the tech at all.

Asking it direct questions or to construct functions with given inputs and outputs can save hours, especially with things that disrupt the main flow of coding - I don't want to empty the structure of what I'm working on from my head just so I can remember everything needed to do something somewhat trivial like calculate the overlapping volume of two tetrahedrons. Of course I could solve it myself but just reading through the suggestion it offers and getting back to solving the real task is so much nicer.

[–] kibiz0r@midwest.social 10 points 6 months ago

The quality really doesn't matter.

If they manage to strip any concept of authenticity, ownership or obligation from the entirety of human output and stick it behind a paywall, that's pretty much the whole ball game.

If we decide later that this is actually a really bullshit deal -- that they get everything for free and then sell it back to us -- then they'll surely get some sort of grandfather clause because "Whoops, we already did it!"

[–] capital@lemmy.world 9 points 6 months ago* (last edited 6 months ago) (2 children)

People keep saying this but it’s just wrong.

Maybe I haven’t tried the language you have but it’s pretty damn good at code.

Granted, whatever it puts out needs to be tested and possibly edited but that’s the same thing we had to do with Stack Overflow answers.

[–] CeeBee@lemmy.world 24 points 6 months ago

I've tried a lot of scenarios and languages with various LLMs. The biggest takeaway I have is that AI can get you started on something or help you solve some issues. I've generally found that anything beyond a block or two of code becomes useless. The more it generates the more weirdness starts popping up, or it outright hallucinates.

For example, today I used an LLM to help me tighten up an incredibly verbose bit of code. Today was just not my day and I knew there was a cleaner way of doing it, but it just wasn't coming to me. A quick "make this cleaner: " and I was back to the rest of the code.

This is what LLMs are currently good for. They are just another tool like tab completion or code linting

[–] VirtualOdour@sh.itjust.works 2 points 6 months ago

I use it all the time and it's brilliant when you put in the basic effort to learn how to use it effectively.

It's allowing me and other open source devs to increase the scope and speed of our contributions, just talking through problems is invaluable. Greedy selfish people wanting to destroy things that help so many is exactly the rolling coal mentality - fuck everyone else I don't want the world to change around me! Makes me so despondent about the future of humanity.

[–] antihumanitarian@lemmy.world 7 points 6 months ago

Have you tried recent models? They're not perfect no, but they can usually get you most of the way there if not all the way. If you know how to structure the problem and prompt, granted.