# Grace

Grace is a domain-specific functional programming language for prompting language models, with a built-in prompt function and a type checker that can infer the JSON schema an output should follow from how the result is used.

Grace, short for Fall-from-Grace, is a programming language built around prompting models and chaining prompts together. It has a built-in prompt function that sends text to a model and returns its output, with no external dependencies to install, and a type system that can constrain that output to a given type, such as a list of text or a list of structured records.

Its type checker can also work backward from how a value is used, so a prompt call with no explicit type or schema can still be inferred correctly: if a variable is interpolated into a string, the checker infers it as text, and if the output is looped over, it infers a list, and so on for each field a program actually uses.

Grace can be tried directly in a browser through an interactive tutorial with no installation, and is released under the BSD-3-Clause license.

Website: https://trygrace.dev/
