Ambiguity in Natural Programming (gracefulliberty.com)
from codeinabox@programming.dev to programming@programming.dev on 29 Jun 13:39
https://programming.dev/post/52743845

#programming

threaded - newest

0t79JeIfK01RHyzo@lemmy.ml on 29 Jun 15:07 collapse
  • When does 4 become 5?

4.5 >=? Lots of programming languages define casting as the largest integer value, not the the rounded value. Outside of programming, there are scenarios where 4 cannot be rounded to 5 either… Like a height requirement for a ride at an amusement park. Though, it might seem natural to round it to humans.

  • When does green become black in a gradient?

<img alt="" src="https://lemmy.ml/pictrs/image/c6d13aa7-62fe-4e48-adaa-ad5c08f0386b.png">

With computer languages, we define colors with red, blue, and green. The above is a gradient on horizontal x-axis, with

(r = 0, g = x, b = 0) 

This is more complicated. If we surveyed 1 million people, maybe we’d get a plot that defined the start of green as something like the following.

<img alt="" src="https://lemmy.ml/pictrs/image/3fc8e183-233f-4495-8d08-dc4afa1d67f2.png">

And then maybe we could take the the average and state that as green.

<img alt="" src="https://lemmy.ml/pictrs/image/c091f3f8-e625-4795-8551-9e5e8407bf47.png">

Though, is that really good enough description of green to serve as a legal definition of green? Maybe lawyers would select significantly different results than the general population when surveyed for the value of green. Maybe the results should be restricted to lawyers?

  • And when does 2 become 7?

If we restricted it pixels to a 3x5 grid…

We could possibly define 2 and 7.

<img alt="" src="https://lemmy.ml/pictrs/image/c309b8eb-ed51-4508-81d1-968e203998e2.png">

<img alt="" src="https://lemmy.ml/pictrs/image/c395d4e3-1fc4-4916-81eb-a02e944e217b.png">

But then is this a 2 or a 7?

<img alt="" src="https://lemmy.ml/pictrs/image/bc371f4f-1a7a-4820-a506-66c10536ca2a.png">

jacksilver@lemmy.world on 29 Jun 15:20 collapse

These are the kinds of things I bring up when talking to people about using LLMs. Sure for short simple logic the room for ambiguity is small, but for more complex systems, the benefit of programming it is to be explicit. Prompts != programming as they don’t produce deterministic outputs and can lead to faulty outcomes (even if they run).