3 ms·
It's not clear to me how they ensure the responses will be valid JSON, are they just asking for it, then parsing the result with error checking?
by trafnar 3y ago
It's not clear to me how they ensure the responses will be valid JSON, are they just asking for it, then parsing the result with error checking?
- davnicwil 3y agoseems like they run the generated response through the typescript type checker, and if it fails, retry using the error message as a further hint to the LLM, until it succeeds.
- verdverm 3y agoalso some very basic prompt engineering
- anonzzzies 3y agoI would expect that, if it doesn’t do that even, why bother… that is also trivial to do anyway.
- deleted 3y ago[deleted]
- esafak 3y agoYes. https://github.com/microsoft/TypeChat/blob/main/src/typechat.ts#L86 https://github.com/microsoft/TypeChat/blob/main/src/typechat...