Standard Schema for Signature Input/Output?
I've only recently came across DSPy and ax so I might not be so familiar with the paradigms here. But as a TS person, the familiarity of zod, valibot, arktype, effect/schema, etc is probably important for people to gain an immediate understanding of a new project. Especially since most are going to be more familiar with Zod usage patterns, like with Vercel AI and something like Mastra.
It's also not immediately clear to me that if you have types/schemas defined that you want to use as Input/Output Signatures, can you reuse those? As I'm looking through, it seems like you have to manually maintain the special Signature string when your project may be using Standard Schema for the same schema logic. I could very well be missing something though.
For example here, would you be able to reuse the SearchResult output schema with ax?
Anyways, I thought a newcomer's thoughts might be helpful as I really like to idea of not maintaining prompts that DSPy as I understand, really revolves around.
Haven't used this but looks like this may be relevant to mention as a Standard Schema -> JSON Schema converter https://xsai.js.org/docs/packages-top/xsschema
My attempt at trying to answer this myself, leaving this here. https://chatgpt.com/share/68c217a6-c35c-8013-88d1-8488d78b49a9
Maybe this is more of a discussion than an issue.
came here to say I'd love it if the project supported zod
+1 for zod
@dosco Absolutely baffling that this doesn't support zod. Please support it.
will look into supporting zod
We need your inputs here. https://github.com/ax-llm/ax/pull/388
Even a simple one level deep "dictionary" (which you could have in an array) would unlock so much more flexibility.
Given how many (if not most?) LLMs support structured output using Zod/JSONSchema, it's very puzzling to see this library force me to treat a simple array like { a: string, b: boolean}[] as any[] (via the json type) which I then have to parse for myself.
That said, I love the idea of DSPy and that you've made Typescript version available 💚