4 ms·
I'm not the person you're responding to, but here's an example of it failing subtly: https://chat.openai.com/share/4e958c34-dcf8-41cb-ac47-f0f6de71232c https:/
by ryanjshaw 3y ago
I'm not the person you're responding to, but here's an example of it failing subtly:
https://chat.openai.com/share/4e958c34-dcf8-41cb-ac47-f0f6de71232c https://chat.openai.com/share/4e958c34-dcf8-41cb-ac47-f0f6de...
finalAlice's Children have no parent. When you point this out, it correctly advises regarding the immutable nature of these types in F#, then proceeds to produce a new solution that again has a subtle flaw: Alice -> Bob has the correct parent... but Alice -> Bob -> Alice -> Bob is missing a parent again.
Easy to miss this if you don't know what you're doing, and it's the kind of bug that will hit you one day and cause you to tear your hair out when half your program has a Bob-with-parent and the other half has an Orphan-Bob.
Phrase the question slightly differently, swapping "Age: int" with "Name: string":
https://chat.openai.com/share/df2ddc0f-2174-4e80-a944-045bc5f92119 https://chat.openai.com/share/df2ddc0f-2174-4e80-a944-045bc5...
Now it produces invalid code. Share the compiler error, and it produces code that doesn't compile but in a different way -- it has marked Parent mutable but then tried to mutate Children. Share the new error, and it concludes you can't have mutable properties in F#, when you actually can, it just tried marking the wrong field mutable. If you fix the error, you have correct code, but ChatGPT-4 has misinformed you AND started down a wrong path...
Don't get me wrong - I'm a huge fan of ChatGPT, but it's nowhere near where it needs to be yet.
- dontupvoteme 3y ago>F# Barely exists in training data. Might as well ask it to code some microcontroller specifically assembly, watch it fail and claim victory.
- ryanjshaw 3y ago> Barely exists in training data. Irrelevant - this is basic computer science. As far as I know, you can't create a bidirectional graph node structure without a mutable data structure or language magic that ultimately hides the same mutability. The fact that ChatGPT recognizes the mutability issue when I explain the bug tells you it has the knowledge, but it doesn't correctly infer the right answer and instead makes false claims and sends developers down the wrong path. This speaks to OP's claim about subtle inaccuracies. I have used ChatGPT to write 10k lines of a static analyzer for a 1k AST model definition in F#, without knowing the language before I started. I'm a big fan, but there were many, many times a less experienced developer would have shot themselves in the foot using it blindly on a project with any degree of complexity.
- dontupvoteme 3y agoI would agree with you if it was a model trained to do computer science, rather than a model to basically do anything, which just happens to be able to do computer science as well. Also code is probably one of the easiest use cases for detecting hallucinations since you can literally just see if it is valid or not the majority of the time. It's much harder for cases where your validation involves wikipedia, or academic journals, etc.
- ryanjshaw 3y agoThen we are in agreement but bear in mind that I was replying to this comment: > So, don't leave us in suspense; what do you ask of it? Because I'm quite sure it can already pass it.
- doctorpangloss 3y agoI'm not really sure what I'm looking at. It seems to perform flawlessly for me... when using Python: https://chat.openai.com/share/7e048acb-a573-45eb-ba6c-2690d2b8ee93 https://chat.openai.com/share/7e048acb-a573-45eb-ba6c-2690d2... I only made two changes to your prompt: one to specify Python, and another to provide explicit instructions to trigger using the Advanced Data Analysis pipeline. You also had a couple typos. I'm not sure if "Programming-like tool that reflects programming language popularity performs poorly on unpopular programming language" is the gotchya you think it is. It performs extremely well authoring Kubernetes manifests and even makes passing Envoy configurations. There's a chance that configuration files for reverse proxy configuration DSLs have better representation than F# does. I guess if you disagree at how obscure F# is, you're observing a real, objective measurement of how obscure it is, in the fascinating performance of this stochastic parrot.
- ryanjshaw 3y agoF# fields are immutable unless you specify they are mutable. The question I posed cannot be solved with exclusively immutable fields. This is basic computer science, and ChatGPT has the knowledge but fails to infer this while providing flawed code that appears to work. An inexperienced developer would eventually shoot themselves in the foot, possibly long after integrating the code thinking it was correct and missing the flaws. FYI, your Python code works because of the mutation "extend()": alice.children.extend([bob, carol])