Skip to main content
← Back to blog

Introducing Refrase: Your Prompts, Upgraded

3 min readProductGuides

Every large language model speaks a slightly different dialect. A prompt that produces excellent results on Claude may underperform on GPT-4o, and a prompt tuned for Gemini might confuse Llama. Most developers discover this the hard way: they switch models and everything breaks.

We built Refrase to solve this problem. Refrase is an open-source prompt optimization engine that automatically adapts your system prompts for any target model. Instead of maintaining separate prompt files for each model, you write one prompt and let Refrase handle the translation.

How It Works

Refrase applies a set of model-specific rules to restructure your prompt without changing its meaning. For Claude, it wraps sections in XML tags. For GPT-4o, it converts to markdown headers with explicit formatting instructions. For Gemini, it adjusts constraint phrasing and adds structured output hints.

Each change is tracked and explained. You can see exactly what was modified, why the change was made, and the original text for comparison. There is no black box.

Getting Started

You can start using Refrase in under a minute. Install the Python or TypeScript SDK, call adapt() with your prompt and target model, and you get back the optimized version along with a detailed changelog.

import refrase

result = refrase.adapt(
    prompt="You are a helpful coding assistant...",
    model="claude-sonnet-4-20250514",
)

print(result.adapted)

For teams already using AI-powered editors, the MCP server integrates directly into Claude Desktop and Cursor. And for the simplest workflow of all, the browser extension optimizes your prompts right inside ChatGPT, Claude, and Gemini with a single keyboard shortcut.

Open Source, Community Driven

The core adaptation engine is fully open source. Anyone can add support for new models by contributing adapter rules. We have already seen community contributions for Cohere, Mistral, and several open-weight models. If a model exists, Refrase can optimize for it.

Check out the documentation to get started, or try the web adapter to see Refrase in action right now.

Share:

Related posts