Lattice
Skip to content
08

Prompt Engineering

9 tools

Makes the prompt an artifact you can diff and test.

  • DSPylibrary

    Declarative prompting that compiles to optimized programs from examples.

  • Instructorlibrary

    Schema-constrained extraction with automatic validation and retry.

  • Humanloopplatform

    Prompt versioning and evaluation for production teams.

  • Guidancelibrary

    Constrained generation by interleaving control flow and model output.

  • PromptLayerplatform

    Prompt registry with request logging and regression testing.

  • Agentaplatform

    Open-source prompt management with a playground and versioning.

  • Promptwatchplatform

    Prompt regression tests and side-by-side comparison.

  • TextGradlibrary

    Automatic prompt optimisation via textual feedback loops.

  • Outlineslibrary

    Constrained generation that masks the token space to valid output.

By Layer boundaries and entries verifiedmethod

Also relevant here

These tools are indexed in another layer, but they also do prompt engineering's job. Each carries its home layer's colour.

Rules of thumb

  • Prompt changes without evals are guesses. Version prompts and measure before you ship a wording change.
  • Keep prompts out of string literals. A prompt you cannot diff is a prompt you cannot review.
  • Fix the examples before the instructions. Models copy what you show more faithfully than what you tell.

Quick answers

Why version prompts?
Because a one-word change can move output quality as much as a model swap. Versioning lets you tie each production response to the exact prompt that produced it and roll back a regression.
Do I need a prompt management tool?
Not for one or two prompts in code with tests. It helps when non-engineers edit prompts, when prompts change faster than deploys, or when you need to compare versions against an eval set.
What is structured output?
Constraining the model to return data matching a schema, such as JSON with required fields. It removes a whole class of parsing failures between the model and your code.

Ask an AI about this page

Opens the assistant with this page’s link and a question already filled in.