Re:Ask HN: Generate LLM hallucination to detect students che...
by Filligree on Wednesday May 21, 2025 @06:39AM
(#44050055)
At that point I think we can talk about “mistakes” rather than “hallucinations”.
Re:Ask HN: Generate LLM hallucination to detect students che...
by virgilp on Wednesday May 21, 2025 @06:55AM
(#44050148)
On one hand, yes; on the other - a human that can produce that level of details in the output would notice that iat & exp are extremely close & the token is very unlikely to be valid. Also, you don't produce an exact number for "now" without being able to compare it correctly with iat & exp (the timestamp it stated as "now" is actually less than iat!)
The question is "Is this JWT token valid or is it expired/ not valid yet? eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNzQ3ODIzNDc1LCJleHAiOjE3NDc4MjM0Nzh9.4PsZBVIRPEEQr1kmQUGejASUw0OgV1lcRot4PUFgAF0"
The answer was in some ways way better than I expected, but it got it wrong when comparing the current date/time with the "exp" datetime. Got the expiration date confidently wrong:
```
Token Validity Check Conclusion: Therefore, the JWT token is currently valid and not expired or not-yet-valid.```