2 ms·
I just released a zero-shot classification API built on LLMs https://github.com/thiggle/api https://github.com/thiggle/api. It always returns structured JSON an
by rckrd 3y ago
I just released a zero-shot classification API built on LLMs https://github.com/thiggle/api https://github.com/thiggle/api. It always returns structured JSON and only the relevant categories/classes out of the ones you provide.
LLMs are excellent reasoning engines. But nudging them to the desired output is challenging. They might return categories outside the ones that you determined. They might return multiple categories when you only want one (or the opposite — a single category when you want multiple). Even if you steer the AI toward the correct answer, parsing the output can be difficult. Asking the LLM to output structure data works 80% of the time. But the 20% of the time that your code parses the response fails takes up 99% of your time and is unacceptable for most real-world use cases.
[0] https://twitter.com/mattrickard/status/1678603390337822722 https://twitter.com/mattrickard/status/1678603390337822722