AI Blocks

Putting the blocks together

This is taking longer than expected.

Try againBrowse the library
AI Blocks · All skills by job · Minds · Mini tools · How it works · From a source · Apps

AI Blocks › Build and ship software

Guaranteed format generator

Say what shape the result must take. Get Python code that always returns valid JSON or matching text.

Guaranteed format generator is a free AI skill for the job "Build and ship software". Give the instructions to an AI assistant that supports the required files and tools, then review its output.

Free · No account · MIT licence · Made by Orchestra Research · Level: advanced

Made by Orchestra Research. See the original on GitHub; we copied it as it is, with its licence.

What it does

A model setup that cannot return broken output. Instead of asking a model nicely for JSON and hoping, this uses a Python library called Outlines to block every token that would break your format. A reply can only be valid JSON, one of a fixed list of choices, text matching a pattern, or an object that fits your Pydantic class. You describe the shape once, as a schema, a regex or a list of allowed answers. The skill then writes the code to load a local model through Transformers, llama.cpp or vLLM and generate against that shape. You need Python and a model you can run yourself. Good for sorting text into labels and pulling fields out of messy text.

You give it

You get

Use it when

How to use it

  1. Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
  2. Ask for the job in your own words. Your AI opens the skill when it fits.
  3. It works best when your AI can run Python code.

More for Build and ship software

Every build and ship software skill