Add support for "description" to Ecto schema fields

6 views
Skip to first unread message

John Dengis

unread,
Nov 14, 2025, 12:10:05 AMNov 14
to elixir-ecto
It's no secret that Ecto is the way that Elixir developers build schemas. Given how LLMs and data extraction are become extremely common place, and JSON schemas are the way to communicate to LLMs both structured output and tool inputs, it would be very useful to be able to do the following:
  1. Generate JSON schemas from a given Ecto schema to guarantee compatibility between extracted data and an Ecto schemas expected payload.
  2. Add descriptions to Ecto schema fields that can be added to the generated JSON schemas in order to add color text to the fields and guide LLMs in their use.
It would be great to see at least the description added to the field macro so that other libraries could build on top and use those to generate JSON schemas for LLMs.

Thanks
John
Reply all
Reply to author
Forward
0 new messages