How does it handle unexpected answers from LLMs under the hood? #250
-
Hi I'm guessing that if |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
We explain the approach in our paper, and it does not involve retries. Simply put, we construct regular expressions for the JSON specs, convert those to finite state machines, and use an index constructed from the states of the finite state machines to get the LLM tokens that could come next. The indexing is akin to standard string search algorithms (e.g. Aho-Corasick) and regex-based indexing approaches. The approach was designed to be adaptable to existing regular expressions parsing/matching approaches and software, but we're currently using a simple DFA library called |
Beta Was this translation helpful? Give feedback.
-
Awesome!
Thanks for the prompt reply!
…On Sat, Aug 19, 2023, 20:42 Brandon T. Willard ***@***.***> wrote:
We explain the approach in our paper <https://arxiv.org/abs/2307.09702>.
—
Reply to this email directly, view it on GitHub
<#250 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJFS32KOQM26VOPML5SFNDXWD3ILANCNFSM6AAAAAA3WWCNMY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
We explain the approach in our paper, and it does not involve retries.
Simply put, we construct regular expressions for the JSON specs, convert those to finite state machines, and use an index constructed from the states of the finite state machines to get the LLM tokens that could come next. The indexing is akin to standard string search algorithms (e.g. Aho-Corasick) and regex-based indexing approaches.
The approach was designed to be adaptable to existing regular expressions parsing/matching approaches and software, but we're currently using a simple DFA library called
interegular
(based ongreenery
). We plan to extract the necessary state information from existing regex libraries so t…