← 开源
Gabriella439

grace

A prompt engineering functional programming language

AI EngineeringPrompt & ScaffoldHaskell
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
621
Star
50
Fork
+1
本周
13
贡献者
创建于 2020-10-22 · 更新于 2026-10-10 · 今日第 15945 名
主要开发者
Gabriella439jhrcekDebugSteven

Gabriella439/grace 排名第 15,945,有 621 个星标。

同类别比较

Gabriella439/grace 排名第 15,945,此处有 8 个同类条目;sandiiarov/skill-creator 排名第 15,942。

同类别比较
名称排名指标
modem-dev/sideshow15,920
语言:
TypeScript
星标数:
623
分叉数:
24
简介:
The missing visual surface companion for agents - generate UI mockups, data visualizations, code explainers, and more
web-agent-master/google-search15,925
语言:
TypeScript
星标数:
623
分叉数:
104
简介:
A Playwright-based Node.js tool that bypasses search engine anti-scraping mechanisms to execute Google searches. Local alternative to SERP APIs with MCP server integration.
millionco/claude-doctor15,939
语言:
TypeScript
星标数:
622
分叉数:
48
简介:
Diagnose your Claude Code sessions
sandiiarov/skill-creator15,942
语言:
TypeScript
星标数:
622
分叉数:
46
简介:
Turn any MCP server, OpenAPI spec, or GraphQL endpoint into a CLI at runtime.
ksimback/tech-debt-skill15,954
星标数:
621
分叉数:
38
简介:
Claude Code skill that produces a thorough, file-cited tech debt audit of an entire codebase
StartHua/Comfyui_CXH_joy_caption15,962
语言:
Python
星标数:
620
分叉数:
35
简介:
Recommended based on comfyui node pictures:Joy_caption + MiniCPMv2_6-prompt-generator + florence2
daydreamsai/daydreams15,965
语言:
TypeScript
星标数:
620
分叉数:
137
简介:
Daydreams is a set of tools for building agents for commerce
ee0pdt/Godot-MCP15,966
语言:
GDScript
星标数:
620
分叉数:
64
简介:
An MCP for Godot that lets you create and edit games in the Godot game engine with tools like Claude
关键参数与规格
关键参数与规格
参数值
语言Haskell
类别AI Engineering
子类别Prompt & Scaffold
关键词Prompt engineering
星标数621
分叉数50
贡献者13
创建日期2020-10-22
更新日期2026-10-10
1 天星标数0
7 天星标数1
排名15,945
上次排名15,747
排名变化-198
7 天星标排名11,130
上次 7 天星标排名11,191
7 天星标排名变化61
总星标排名16,335
上次总星标排名16,311
总星标排名变化-24
国家USA
README 摘录

Grace Grace (short for Fall-from-Grace) is a domain-specific programming language for prompting models. In particular, Grace is well-suited for building and auto-generating elaborate prompt chains You can use Grace in your browser without installing anything by visiting trygrace. That website includes an interactive tutorial and is the recommended way to both learn and get started with using Grace. Features Integrated language support for models You don't need to install any dependencies or import anything to

get started. Everything you need is built directly into the language. The language provides a built-in function for prompting a model: … and you can structure the output by giving a type annotation: If the type is sufficiently self-explanatory, you can even omit the prompt: In fact, you can omit the type, too, if the type can be inferred from use: JSON schemas inferred from use That last example works even without a prompt, schema, or type because Grace's

type checker reasons backwards from how the output is used to infer the correct JSON schem, like this: the type checker infers that the variable must be the type checker infers that the function must generate a the type checker infers each element of the has type therefore the function outputs a value of type … which you can read as "a of records, each of which has a field containing ". The interpreter then converts that Grace type into the following

matching JSON schema to constrain the model's output: Finally, the model infers from that JSON schema alone (without any additional prompt) that it should generate a JSON-encoded list of names. Code generation You can prefix the keyword with to ask the model to generate a Grace expression of any type. For example: You can use an explicit type annotation to guide the generated code: … and if the type is informative enough then you can omit the prompt: Notice in

that last example how the model can generate code which itself s an model. Inferred types also guide the code generation process, too! There the model infers that the type of the function needs to be (a function whose input is and whose output is ) and generates an function matching that type which uppercases . Command line This Haskell package builds a executable with the following command-line API: You can use the subcommand for interpreting a single file: … and you

can specify to process standard input instead of a file, like this: You can also use the subcommand for interactive usage: Name Like all of my programming language projects, Grace is named after a character from PlaneScape: Torment, specifically Fall-from-Grace. The name of this programming language conflicts with another programming language, so use the longer name, "Fall-from-Grace", to disambiguate when it's not clear from the context.

常见问题

记录了多少星标和分叉?

Gabriella439/grace 有 621 个星标和 50 个分叉。

仓库排名是多少?

Gabriella439/grace 排名第 15,945。

记录的语言和类别是什么?

Gabriella439/grace 有 621 个星标,语言为 Haskell,类别为 AI Engineering。

哪个仓库排名最接近?

Gabriella439/grace 与 sandiiarov/skill-creator 比较,后者排名第 15,942,有 622 个星标。

README

Grace

Grace (short for Fall-from-Grace) is a domain-specific programming language for prompting models. In particular, Grace is well-suited for building and auto-generating elaborate prompt chains

You can use Grace in your browser without installing anything by visiting trygrace.dev. That website includes an interactive tutorial and is the recommended way to both learn and get started with using Grace.

Features

  • Integrated language support for models

    You don't need to install any dependencies or import anything to get started. Everything you need is built directly into the language.

    The language provides a built-in prompt function for prompting a model:

    >>> let key = ./openai.key : Key
    
    >>> prompt{ key, text: "Generate a list of names" }
    "
    Here are 40 varied first names (mixed genders and cultures):
    
    - Aiden
    - Sofia
    - Mateo
    …
    - Mabel
    - Imani
    - Zane
    
    Want names filtered by gender, culture, style (modern/vintage), or as full names/surnames?"
    

    … and you can structure the output by giving a type annotation:

    >>> prompt{ key, text: "Generate a list of names" } : List Text
    [ "Ava Thompson"
    , "Liam Patel"
    , "Sophia Martinez"
    …
    , "Jackson Rivera"
    , "Zoe Wilson"
    , "Aiden Park"
    ]
    

    If the type is sufficiently self-explanatory, you can even omit the prompt:

    >>> prompt{ key } : List { name: Text }
    [ { "name": "Alice" }
    , { "name": "Bob" }
    , { "name": "Charlie" }
    , { "name": "Diana" }
    , { "name": "Evan" }
    ]
    

    In fact, you can omit the type, too, if the type can be inferred from use:

    >>> for { name } of prompt{ key } in "Hello, ${name}!"
    [ "Hello, Alice!"
    , "Hello, Bob!"
    , "Hello, Carol!"
    , "Hello, Dave!"
    , "Hello, Eve!"
    ]
    
  • JSON schemas inferred from use

    That last example works even without a prompt, schema, or type because Grace's type checker reasons backwards from how the output is used to infer the correct JSON schem, like this:

    • the type checker infers that the name variable must be Text

      … because the name variable is interpolated into "Hello, ${name}!"

    • the type checker infers that the prompt function must generate a List

      … because the program loops over the output using a for … of loop.

    • the type checker infers each element of the List has type { name: Text }

      … because the for … of loop destructures each element using { name }

    • therefore the prompt function outputs a value of type List{ name: Text }

    … which you can read as "a List of records, each of which has a name field containing Text".

    The interpreter then converts that Grace type into the following matching JSON schema to constrain the model's output:

    {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "required": ["name"],
        "additionalProperties": false
      }
    }
    

    Finally, the model infers from that JSON schema alone (without any additional prompt) that it should generate a JSON-encoded list of names.

  • Code generation

    You can prefix the prompt keyword with import to ask the model to generate a Grace expression of any type. For example:

    >>> import prompt{ key, text: "increment" }
    \n -> n + 1
    

    You can use an explicit type annotation to guide the generated code:

    >>> import prompt{ key, text: "increment" } : { input: Natural } -> { output: Natural }
    \{ input } -> { "output": input + 1 }
    

    … and if the type is informative enough then you can omit the prompt:

    >>> import prompt{ key } : { "Job Description": Text } -> { "Is Finance?": Bool }
    let key = 🔒
    
    in  \{ "Job Description" } ->
          prompt
            { "key":
                key
            , "text":
                "
                Determine whether the following job description is for a finance role.
                Return a JSON object with a single boolean field \"Is Finance?\": true if it is a finance role, otherwise false.
                Answer only valid JSON, nothing else.
    
                Job description:
                ${.'Job Description'}
                "
            , "model":
                null
            , "search":
                null
            , "effort":
                null
            }
            : { "Is Finance?": Bool }
    

    Notice in that last example how the model can generate code which itself prompts an model. Neat!

    Inferred types also guide the code generation process, too!

    >>> let upper = import prompt{ key, text: "uppercase" } in "Hello, ${upper "gabby"}!"
    "Hello, GABBY!"
    

    There the model infers that the type of the upper function needs to be Text -> Text (a function whose input is Text and whose output is Text) and generates an function matching that type which uppercases Text.

Command line

This Haskell package builds a grace executable with the following command-line API:

$ grace --help
Usage: grace COMMAND
  Command-line utility for the Grace language

Available options:
  -h,--help                Show this help text

Available commands:
  interpret                Interpret a Grace file
  text                     Render a Grace text literal
  format                   Format Grace code
  builtins                 List all built-in functions and their types
  repl                     Enter a REPL for Grace

You can use the interpret subcommand for interpreting a single file:

# ./greet.ffg

for { name } of prompt{ key: ./openai-key.txt }

in  "Hello, ${name}!"
$ grace interpret ./greet.ffg
[ "Hello, Alice!", "Hello, Bob!", "Hello, Charlie!" ]

… and you can specify - to process standard input instead of a file, like this:

$ grace interpret - <<< '2 + 2'
4

You can also use the repl subcommand for interactive usage:

$ grace repl
>>> let key = ./openai-key.txt
>>> prompt{ key } : List { "First Name": Text, "Last Name": Text }
[ { "First Name": "John", "Last Name": "Doe" }
, { "First Name": "Jane", "Last Name": "Smith" }
, { "First Name": "Alice", "Last Name": "Johnson" }
, { "First Name": "Michael", "Last Name": "Brown" }
, { "First Name": "Emily", "Last Name": "Davis" }
]

Name

Like all of my programming language projects, Grace is named after a character from PlaneScape: Torment, specifically Fall-from-Grace.

The name of this programming language conflicts with another programming language, so use the longer name, "Fall-from-Grace", to disambiguate when it's not clear from the context.

排名相邻
同类项目