Practical Notes
If you’re building an agent that triggers actions, define a narrow union type for allowed intents and keep each intent payload minimal. Add deterministic validation (schema + business rules) and log all repairs—repairs are where many hidden bugs appear. Over time, grow the schema set rather than growing prompts.
Safety note: Always validate typed JSON with business rules (not just schema) before executing real actions.
FAQ
Q: Do I still need prompt engineering? A: Much less. You focus on defining types/schemas; prompts become smaller and more stable.
Q: How does it handle invalid JSON? A: It validates and can re-prompt the model to repair non-conforming output.
Q: Is it only for TypeScript apps? A: TypeChat provides TypeScript/JS support, and the repo also references other language variants.