by kmkarim · 2y ago · 0 comments
i.e given a text, always return back a certain set of fields. For some keys here is the possible set of enums etc. One shot prompting does work but curious how others approach this if you have training data on hand.
[0]: https://github.com/outlines-dev/outlines [1]: https://github.com/1rgs/jsonformer
Crude, I know, but it’s compatible with every model. Which is useful if you want to compare the many different models out there.
LLMs are so much better for this than LSTMs now.
Aside from that, take a look at llama.cpp grammars.