Hacker News new | ask | show | jobs
by koakuma-chan 402 days ago
I asked an LLM and it said "A stack is a data structure that follows the Last In, First Out (LIFO) principle. This means that the last element added to the stack is the first element to be removed."
2 comments

It’s subtle but I would regard this as an incorrect answer.

The structure of the LLM answer is:

A is B; B exhibits property C.

The correct answer is:

A exhibits property C; B is the class of things with property C; therefore A is B.

There is a crucial difference between these two.

I think you've read too much early Wittgenstein. That is simply not how people communicate.
This doesn't apply to all prompts, and the prompt was not provided. Natural language is a fickle thing.
This kind of pointless hair splitting is why people would rather talk to an LLM.
This kind of “hair splitting” is the foundation on current prompt engineering though…
Yikes:( I am so worried about the damage that will be caused by the misuse of these tools. Already a lot of young folks will just mindlessly trust whatever the magic oracle spits out at them. We need to go back to testing people with pen and paper I suppose.
I read this and I see a common thinking fallacy, when someone is inclined to believe something a priori they fit the evidence to their a priori beliefs.
No, its fairly simple - I misread
Why is that a bad answer?
Sorry - I misread the LLM answer - actually the LLM produced a correct answer here
> No it is not…

That’s a queue, not a stack. The LLM response was correct.

But a stack is commonly LIFO, not FIFO?!
This reads like a line from a QwQ or Qwen3 CoT chain :)
I mean, is it wrong? It seems correct. Unless I'm missing something.
Oops, my bad. I seem to have misread. Sorry.
No, a stack is LIFO like it said. A queue is FIFO or in other words LILO “Last In Last Out”.
My last job was at the office. I had my work queue implemented as a stack of files. I would sit at my desk and, in an infinite loop, pop files from my stack and process them. Occasionally, my supervisor would come and push a new file onto my stack. A naive worker would think that, once I was done with my stack, I could finally get some sleep, but no. Our office implemented something called "work stealing," where, once I was done with my own work, I had to visit a random co-worker and pop files from their stack.
No. The LLM's answer is correct.