How .prompt compares

See how .prompt stacks up against the alternatives.

Feature F-strings YAML Markdown Jinja2 .prompt
Compile-time resolution
Type system ⚠️
Input contracts
Output contracts
Versioning
Fragment composition ⚠️ ⚠️
Breaking change detection

Summary

🐍

F-strings

+ Built into Python

+ Simple for small prompts

- No structure

- No validation

- No versioning

- Scattered across code

📄

YAML Config

+ Human-readable

+ Structure supported

- No logic/branching

- No compile-time resolution

- No contracts

- Limited tooling

📝

Markdown

+ Simple

+ Universal

+ Good for documentation

- No variables

- No logic

- No structure

- Cannot compose

🎨

Jinja2

+ Powerful templating

+ Wide adoption

+ Extensible

- Runtime evaluation

- No type system

- No contracts

- No versioning

.prompt

+ Compile-time resolution

+ Type system

+ Versioning

+ Contracts

+ Fragment composition

- New syntax to learn

.prompt is purpose-built for prompt engineering. It brings the discipline of software engineering to your prompts.