martosaur
InstructorLite – structured outputs for LLMs, a tinkering-friendly fork of Instructor
Hello,
I’m excited to introduce InstructorLite – a fork of the Instructor package.
Instructor brought the very idea of structured LLM prompting to the Elixir ecosystem. InstructorLite is aimed to distill it into a composable set of simple tools that people can build upon.
What’s new in InstructorLite 0.1.0 compared to Instructor 0.0.5?
- More granular API for more flexibility
- Anthropic adapter
- Reduced source code complexity
- All streaming capabilities removed
- BYO json schema as an official policy. Schema converter is still there, but it’s best-effort
- Llamacpp adapter now uses JSON schema instead of GBNF grammar
- OpenAI adapter is reimplemented using brand new structured outputs instead of JSON mode (Introduction to Structured Outputs)
- Fixed Ecto 3.12 compatibility
It’s not a drop-in replacement, but it’s very close. Feel free to report any issues you run into if you decide to give it a try!
Hex: instructor_lite | Hex
Migration guide: Migrating from Instructor — instructor_lite v1.2.0
Repo:
Most Liked
martosaur
InstructorLite v1.0.0
- OpenAI adapter was changed to use Responses API.
- New ChatCompletionsCompatible adapter was added for people who want to continue using OpenAI Chat Completions endpoint or, as the name suggests, other chat completions compatible providers like Grok.
- Jason dependency is now optional. InstructorLite will use built-in JSON module if it’s available
- Some general housekeeping: more tests, revamped docs and cookbooks, standardized prompts across adapters, etc. All adapters were tested against reasoning models to verify reasoning tokens in output do not surprise them.
A very short migration guide: Changelog — instructor_lite v1.2.0
martosaur
igorb
Appreciate your work! I just returned to a project using Instructor today and bumped into the compatibility issue with Ecto 3.12. Tried the fork that attempted to fix it but it didn’t work (bummer that instructor doesn’t seem to be maintained anymore!). But migrating to instructor_lite was a breeze and everything works great now.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









