Log in
Log into community
Find answers from the community
View all posts
Related posts
Did this answer your question?
π
π
π
Powered by
Hall
Inactive
Updated last year
0
Follow
What s the success rate on getting a LLM
What s the success rate on getting a LLM
Inactive
0
Follow
k
kkang2097
last year
Β·
What's the success rate on getting a LLM to return JSON formatted answers when prompted to?
D
k
3 comments
Share
Open in Discord
D
DanB
last year
My personal experience (based on 1 project that went into "production" but then had <10 daily active users)
~80% if you take the raw response. But it was 100% if you strip everything before the first
{
or
[
and strip everything after the last
}
or
]
.
The JSON was always valid, and the only failure mode was from the model saying stuff like
Sure. Here is your answer:
before the JSON
D
DanB
last year
You may be familiar with
https://js.langchain.com/docs/modules/model_io/output_parsers/
I have never tried it or even looked at it closely. I blindly guesses it's no better than the 3 line function we had that stripped text surrounding the JSON.
k
kkang2097
last year
Sweet, thanks. as long as it's close to 100%, perfect. Trying to iron out things on the TS side right now
Add a reply
Sign up and join the conversation on Discord
Join on Discord