TypeChat

TypeChat is a library that makes it easy to build natural language interfaces using types.

What is TypeChat?

TypeChat is a library that makes it easy to build natural language interfaces using types.

Overview of TypeChat

What it is

TypeChat is a library that makes it easy to build natural language interfaces using types. It replaces prompt engineering with schema engineering by allowing developers to define types that represent the intents supported in a natural language application. The library handles constructing prompts to a large language model (LLM), validating the LLM response against the schema, and summarizing the instance to confirm alignment with user intent.

Key features

  • Constructs a prompt to the LLM using types defined by the developer.
  • Validates the LLM response conforms to the schema; if validation fails, it repairs the non-conforming output through further language model interaction.
  • Summarizes succinctly (without using an LLM) the instance and confirms it aligns with user intent.

Use cases

TypeChat can be used to build natural language interfaces for applications such as categorizing sentiment, shopping carts, music applications, or any scenario where user intent needs to be matched from natural language input. It supports adding additional intents by adding types into a discriminated union and making schemas hierarchical using a meta-schema.

Getting started

npm install typechatFor more detailed instructions, see the repository README.

License and pricing

License: MIT. Pricing: open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/microsofttypechat.svg)](https://yunodb.com/tools/microsofttypechat?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/microsofttypechat?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/microsofttypechat.svg" alt="Featured on YunoDB" height="20"></a>