Analysis updated 2026-05-18
Extract structured data like names, emails, and lists from free-form text into typed Lisp objects.
Constrain a local llama.cpp model's output to match a JSON Schema derived from your class.
Replace manual hash table or plist parsing of LLM output with real typed CLOS instances.
Add field descriptions to class slots to improve extraction accuracy on ambiguous data.
| licjon/clos-alchemy | edencompiler/lwlgl | wondermonger-daydreaming/latent-lisp | |
|---|---|---|---|
| Stars | 3 | 3 | 0 |
| Language | Common Lisp | Common Lisp | Common Lisp |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 4/5 | 4/5 | 5/5 |
| Audience | developer | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Not on Quicklisp yet, local llama.cpp use requires building a shared library and downloading a GGUF model.
clos-alchemy is a Common Lisp library that turns messy, unstructured text into structured, typed data using a large language model. Instead of getting back loose strings, hash tables, or plists from an AI model, you get a real typed object built from an ordinary class you already defined. The way it works is that you write a normal CLOS class, Common Lisp's built in system for defining object types, with typed slots like strings, integers, or lists. The library inspects that class definition using Lisp's metaobject protocol, automatically turns it into a JSON Schema, and uses that schema to constrain what the language model is allowed to generate. The AI's output is then checked against the schema and used to build and return a genuine instance of your original class, with all its normal accessors working as expected. This mirrors a similar tool in the Python world called instructor, which does the same thing using Pydantic models instead of CLOS classes. Setup currently requires manually cloning this repository and a companion backend library into a folder that Quicklisp, the Lisp package system, can find, since it is not yet published there. If you want to run everything locally using llama.cpp instead of a remote API, additional companion repositories are needed, along with building llama.cpp itself as a shared library and downloading a GGUF format model file. The library supports a wide range of Lisp type specifiers, mapping things like strings, integers, booleans, enumerated values, lists, and nested objects to their JSON Schema equivalents, and it deliberately refuses to guess when a type has no clear JSON equivalent rather than silently falling back to treating everything as a string. Field documentation on your class slots is also fed into the model's prompt to improve extraction accuracy on ambiguous fields. The full README is longer than what was shown.
A Common Lisp library that extracts structured, typed objects from messy text by having an LLM fill in your own class definitions.
Mainly Common Lisp. The stack also includes Common Lisp, Quicklisp, llama.cpp.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.