TypeChat  by microsoft

Library for building natural language interfaces using types

created 2 years ago
8,536 stars

Top 6.1% on sourcepulse

GitHubView on GitHub
Project Summary

TypeChat is a library for building natural language interfaces, abstracting away complex prompt engineering with schema definition. It targets developers seeking to integrate LLM capabilities into applications, enabling structured and validated natural language interactions.

How It Works

TypeChat replaces traditional prompt engineering with schema engineering. Developers define TypeScript-like types representing application intents. TypeChat then constructs LLM prompts based on these schemas, validates LLM responses against them, and attempts to repair invalid outputs through iterative LLM calls. This approach aims for greater robustness and a lower learning curve compared to manual prompt crafting.

Quick Start & Requirements

  • Install for TypeScript/JavaScript: npm install typechat
  • Source available for Python, TypeScript, C#/.NET.
  • Explore example projects locally or via GitHub Codespaces.
  • Official documentation available for deeper understanding.

Highlighted Details

  • Schema-driven LLM interaction, replacing prompt engineering.
  • Automatic validation and repair of LLM responses against defined types.
  • Supports discriminated unions for intent hierarchies and meta-schemas for conditional sub-schema selection.
  • Aims to simplify the creation of safe, structured, and reliable natural language interfaces.

Maintenance & Community

  • Contributor License Agreement (CLA) required for contributions.
  • Adheres to the Microsoft Open Source Code of Conduct.

Licensing & Compatibility

  • License details not explicitly stated in the provided README snippet.
  • Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The README does not detail specific LLM providers supported or any performance benchmarks. Licensing and compatibility for commercial use are not explicitly mentioned, requiring further investigation.

Health Check
Last commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
0
Star History
127 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
2 more.

prompt-engine by microsoft

0.0%
3k
NPM library for LLM prompt engineering
created 3 years ago
updated 2 years ago
Feedback? Help us improve.