Tosijs-schema is a super lightweight schema-first LLM-native JSON schema library
1–10 of 31 posts
Re: Tosijs-schema is a super lightweight schema-first LLM-native JSON schema library
#2Re: Tosijs-schema is a super lightweight schema-first LLM-native JSON schema library
#3I wrote this library this weekend after realizing that Zod was really not designed for the use-cases I want JSON schemas for: 1) defining response formats for LLMs and 2) as a single source of truth for data structures.
Re: Tosijs-schema is a super lightweight schema-first LLM-native JSON schema library
#4I wrote this library this weekend after realizing that Zod was really not designed for the use-cases I want JSON schemas for: 1) defining response formats for LLMs and 2) as a single source of truth for data structures.
What led you to that conclusion?
Re: Tosijs-schema is a super lightweight schema-first LLM-native JSON schema library
#5Re: Tosijs-schema is a super lightweight schema-first LLM-native JSON schema library
#6I wrote this library this weekend after realizing that Zod was really not designed for the use-cases I want JSON schemas for: 1) defining response formats for LLMs and 2) as a single source of truth for data structures.
What led you to that conclusion?
Re: Tosijs-schema is a super lightweight schema-first LLM-native JSON schema library
#7Earlier quoted context omitted.
What led you to that conclusion?
And what makes this different? What makes it LLM-native?
This is actually discussed in the linked article (READ ME file).
Re: Tosijs-schema is a super lightweight schema-first LLM-native JSON schema library
#8Had you considered using something like XML as the transport format rather than JSON? If the UX is similar to zod it wouldn't matter what the underlying data format is, and XML is meant to support schemas unlike JSON.
That said, JSON is “language neutral” but also super convenient for JavaScript developers and typically more convenient for most people than XML.
Re: Tosijs-schema is a super lightweight schema-first LLM-native JSON schema library
#9I wrote this library this weekend after realizing that Zod was really not designed for the use-cases I want JSON schemas for: 1) defining response formats for LLMs and 2) as a single source of truth for data structures.
What led you to that conclusion?
Re: Tosijs-schema is a super lightweight schema-first LLM-native JSON schema library
#10Earlier quoted context omitted.
What led you to that conclusion?
Zod's validation errors are awful, the json schema it generates for LLM is ugly and and often confusing, the types structures Zod creates are often unintelligible in the and there's even no good way to pretty print a schema when you're debugging. Things are even worse if you're stuck with zod/v3