LMQL
is a SQL-like programming language for interacting with LMs.
It takes a declarative approach to specifying the output constraints for a language model, with a SQL flavor.
Microsoft created a project called guidance
which is an LLM-agnostic language to “interleave generation, prompting, and logical control into a single continuous flow matching how the language model actually processes the text”.
It’s based on Handlebars templates and provides in-template notion for system and user messages.
kor
is a prototype used to extract structured data from language model responses.
It takes a more object oriented approach and is Python-specific.
rebuff
is a multilayer prompt injection defense library that continuously improves and adapts based on previous attacks.