In a recent project, I wanted to generate structured output according to a highly-nested hierarchy of Pydantic models (see My Desired Structured Output). The ultimate goal is to generate objects of type N, but I knew that’s probably asking too much, so I decided to see if LLMs can generate objects of type E or I. This quest sent me down a rabbit whole, and it became clear to me that many open-source LLM projects are on shaky grounds and need much improvement.

SOSO (as of January 26, 2024)

outlines

guidance

LMQL

JSONFormer, ReML, etc.

llama.cpp (GBNF)

LMFE

llama-cpp-agent