Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
dwattttt
on Aug 14, 2023
|
parent
|
context
|
favorite
| on:
Show HN: LLMs can generate valid JSON 100% of the ...
If you're choosing the next token based on a list of valid next tokens, a uniform random distribution can always generate valid JSON too!
quickthrower2
on Aug 14, 2023
|
next
[–]
Yep. So can this:
fun generate_valid_json(seed): return "{}"
neoncontrails
on Aug 15, 2023
|
prev
[–]
But that's not what an LLM does.
antonvs
on Aug 15, 2023
|
parent
[–]
The point is that if you're "choosing the next token based on a list of valid next tokens," it's not surprising that you'll only generate valid output, since absolutely any choice mechanism will suffice.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: