grace  by Gabriella439

A functional programming language for LLM prompting

Created 4 years ago
433 stars

Top 68.6% on SourcePulse

GitHubView on GitHub
Project Summary

Grace is a functional programming language designed for building and auto-generating elaborate prompt chains for Large Language Models (LLMs). It targets developers and researchers seeking a structured, type-safe way to interact with LLMs, enabling complex prompt engineering tasks with inferred type safety and automatic schema generation for model outputs.

How It Works

Grace integrates LLM interaction directly into the language, eliminating the need for external libraries. Its core innovation lies in inferring JSON schemas for LLM outputs by analyzing how the data is used within the Grace program. This type inference mechanism allows the LLM to generate data conforming to the required structure without explicit schema definitions in the prompt itself, simplifying prompt creation and improving output reliability.

Quick Start & Requirements

  • Install/Run: Use the browser-based trygrace.dev for an interactive tutorial and immediate use. Alternatively, install the Haskell package to build a grace executable.
  • Prerequisites: Requires an OpenAI API key.
  • Links: trygrace.dev

Highlighted Details

  • Type-Safe LLM Interaction: Grace is a typed language where inferred types constrain LLM outputs.
  • Schema Inference: Automatically generates JSON schemas from data usage, guiding LLM generation.
  • Code Generation: Can prompt LLMs to generate Grace expressions of specific types, including functions.
  • Command-Line Interface: Includes interpret, text, format, builtins, and repl commands.

Maintenance & Community

The project is maintained by Gabriella439. Further community or roadmap information is not detailed in the README.

Licensing & Compatibility

The README does not explicitly state a license. This requires further investigation for commercial use or closed-source linking.

Limitations & Caveats

The project's reliance on OpenAI's API means it is tied to that ecosystem. The absence of a stated license is a significant caveat for adoption.

Health Check
Last Commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
18
Issues (30d)
0
Star History
10 stars in the last 30 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
6 more.

prompt-engine by microsoft

0.1%
3k
NPM library for LLM prompt engineering
Created 3 years ago
Updated 2 years ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Kevin Hou Kevin Hou(Head of Product Engineering at Windsurf), and
6 more.

TypeChat by microsoft

0.1%
9k
Library for building natural language interfaces using types
Created 2 years ago
Updated 2 months ago
Feedback? Help us improve.