6 ms·
JSON Schema is a schema built on JSON and it’s already being used. Using XML would mean converting the XML into JSON schema to define the response from the LLM.
by podperson 10mo ago
JSON Schema is a schema built on JSON and it’s already being used. Using XML would mean converting the XML into JSON schema to define the response from the LLM.
That said, JSON is “language neutral” but also super convenient for JavaScript developers and typically more convenient for most people than XML.
- yeasku 10mo agoLLMs are not people. We want a format for LLMs or for people?
- deleted 10mo ago[deleted]
- podperson 10mo agoJSON schema is very human readable.
- _heimdall 10mo agoWhy does that matter though? MCP is meant for LLMs not humans, and for something like this lib it seems the human side if the API is based on JavaScript not JSON.
- drowsspa 10mo agoAs a person myself, I very much prefer JSON
- _heimdall 10mo agoMCP isn't meant for humans though, I'm not side why it matters what a human would prefer
- _heimdall 10mo agoMaybe I missed a detail here, sorry if that's the case! Why would we need to concert XML, which already supports schemas and is well understood by LLMs, back to JSON schema?
- verdverm 10mo agoBecause most of the world uses JSON and has rich tooling for JSONSchemas, notable many LLM providers allow JSONSchemas to be part of the request when trying to get structured output
- _heimdall 10mo agoLLM providers allow sending any string of text though, right? In my experience the LLM understands XML really well, though obviously that doesn't negate them from understanding JSONSchema.
- verdverm 10mo agoNo, it's more than just text now, it's more than just an LLM for the most part now too. They are agentic systems with multiple LLMs, tools, and guardrails When you provide a JSONSchemea, the result from the LLM is validated in the code between before passing on to the next step. Yes the LLM is reading it too, but non LLM parts of the system use the schema as well This is arguably much more important for tools and subagents, but also these things are being trained with JSONSchema for tool calling and structured output