3 ms·
Every time the LLM uses this tool, the response schema is validated--deterministically. The LLM will never see a non-integer value as output from the tool.
by cle 1y ago
Every time the LLM uses this tool, the response schema is validated--deterministically. The LLM will never see a non-integer value as output from the tool.
- whoknowsidont 1y agoCan you please diagram out, using little text arrows ("->"), what you think is happening so I can just fill in the gap for you?
- masafej536 1y agollm tool call -> mcp client validates the schema -> mcp client calls the tool -> mcp server validates the schema -> mcp server responds with the result -> mcp client passes the tool result into llm
- redandblack 1y agonot a developer. what happens if this schema validation fails here - what will the mcp server respond with and what will the llm do next (in a deterministic sense)? llm tool call -> mcp client validates the schema -> mcp client calls the tool -> mcp server validates the schema
- masafej536 1y agoThey often do fail, at the client level you can just feed the schema validation error message back into the LLM and it corrects itself most of the time. If not the LLM throws itself into a loop until its caller times it out and it sends an error message back to the user. At the server level it's just a good old JSON API at this point, and the server would send the usual error message it would send out to anyone.
- cle 1y agoI write these as part of my job, I know how they work. I'm not going to spend more time explaining to you (and demonstrating!) what is in the spec. Read the spec and let the authors know that they don't understand what they wrote. I've run out of energy in this conversation.
- whoknowsidont 1y agoI gave you the chance to be explicit about your mental model of these systems and you run away with very unoriginal grandstand.