The Research Report
Promptomatix: Salesforce Built a Zero-Config Prompt Optimizer That Actually Works
Salesforce AI Research dropped a paper in July 2025 that flew under the radar for most people. It is called Promptomatix. It is an automatic prompt optimization framework. It now has 954 GitHub stars and 100 forks. The arXiv ID is 2507.14241v2.
Most prompt optimization tools make you do the hard work. You configure modules. You label datasets. You tune hyperparameters. Promptomatix does the opposite. You type a plain English task description. It returns a working prompt.
This matters because prompt engineering is still a manual craft. It takes expertise. It takes time. It takes money. Promptomatix attacks all three problems at once.
What Promptomatix Actually Does
The framework takes a natural language task description and runs it through a pipeline. Here is what happens under the hood.
First, it analyzes your intent. It figures out the task type, the inputs, the outputs, and the constraints. It does this automatically using a teacher LLM like GPT-4o or Claude 3.5 Sonnet.
Second, it generates synthetic training data. It creates labeled examples tailored to your task. You do not need a dataset. You do not need labels. The system invents both.
Third, it selects a prompting strategy. It picks from options like direct prediction, Chain-of-Thought, Program-of-Thought, or ReAct. The choice depends on what the task needs.
Fourth, it optimizes the prompt. It runs iterations against the synthetic data. It scores results. It refines wording. It trims length. It stops when it hits a quality threshold or a budget limit.
Fifth, it evaluates the final prompt on a held-out test set. It gives you metrics. It gives you the prompt. It gives you the option to provide feedback and run another round.
The whole thing runs through a CLI or a Python API. It supports OpenAI, Anthropic, and Cohere models. It tracks every session in a log so you can compare versions.
The Two-Backend Design
Promptomatix ships with two optimization backends. This is a smart architectural choice.
The first is a lightweight meta-prompt optimizer. It uses a single meta prompt with a teacher LLM to generate improved prompts. This is fast. It is cheap. It works well for simple tasks. You can run it with minimal compute.
The second is a DSPy-powered compiler. DSPy is the popular framework from Stanford that treats prompt optimization as a structured compilation problem. Promptomatix wraps DSPy but adds automation on top. It auto-configures the DSPy modules. It auto-selects the metrics. It auto-sets the number of trials.
The modular design means you can swap backends without changing your code. It also means future frameworks like AdalFlow can plug in cleanly.
How It Differs from DSPy and Other Optimizers
DSPy is powerful. It is also opinionated. To use DSPy well, you need to define your program structure. You need to specify input and output fields. You need to choose an optimizer. You need a training set.
Promptomatix removes all of that. You do not write code to define your task. You describe it in English. The system extracts the structure for you.
Here is a concrete example. In DSPy, you might write this.
import dspy
class SentimentAnalyzer(dspy.Module):
def __init__(self):
self.classify = dspy.ChainOfThought("text -> sentiment")
def forward(self, text):
return self.classify(text=text)
optimizer = dspy.BootstrapFewShot(metric=accuracy)
optimized = optimizer.compile(SentimentAnalyzer(), trainset)
In Promptomatix, you write this.
python -m src.promptomatix.main --raw_input "Classify text sentiment into positive or negative"
That is it. The framework handles the module selection, the metric choice, the data generation, and the optimization loop.
Other tools have similar gaps. AdalFlow requires manual technique selection. PromptWizard needs substantial manual intervention. PromptFoo only evaluates, it does not optimize. AutoPrompt needs gradient-based search and serious compute.
Promptomatix is the first framework that truly automates the full pipeline from intent to optimized prompt.
The Cost-Aware Angle
Most optimization frameworks chase accuracy and ignore cost. Promptomatix does not.
It includes a cost-aware optimization objective. You can set your budget. The system balances quality against token usage and API calls. It trims prompt length when longer prompts do not improve results. It stops early when gains flatten.
This is practical. In production, every token costs money. A prompt that is 30 percent shorter with the same accuracy saves real dollars at scale.
The paper reports that Promptomatix reduces prompt length and computational overhead compared to baseline methods. It achieves competitive or superior performance on five task categories: mathematical reasoning, question answering, classification, summarization, and text generation.
The Synthetic Data Trick
The biggest hidden strength of Promptomatix is synthetic data generation.
Most prompt optimizers assume you have a labeled dataset. Most people do not. Creating one takes hours or days. Promptomatix generates synthetic training and test sets automatically. It uses the teacher LLM to create varied, realistic examples that match your task.
The paper calls this a key contribution. It eliminates the data bottleneck that blocks most users from running prompt optimization at all.
The synthetic data module is not naive. It tailors examples to the task type. It ensures diversity. It splits data into train and test sets with sensible ratios. You can override defaults if you have your own data, but you do not have to.
How to Get Started
The repository is at github.com/SalesforceAIResearch/promptomatix. It is Apache licensed. Installation is straightforward.
git clone https://github.com/SalesforceAIResearch/promptomatix.git
cd promptomatix
./install.sh
The installer checks Python 3, creates a virtual environment, pulls DSPy as a submodule, and installs dependencies. You activate the environment and set your API keys.
source promptomatix_env/bin/activate
export OPENAI_API_KEY="your_key"
Then run a quick test.
python -m src.promptomatix.main --raw_input "Given a question about human anatomy answer it in two words" --model_name "gpt-3.5-turbo" --backend "simple_meta_prompt" --synthetic_data_size 10 --model_provider "openai"
For deeper exploration, the repo includes Jupyter notebooks covering basic usage, advanced optimization, metrics evaluation, and customization.
If you have your own dataset, you can load it directly.
python -m src.promptomatix.main --raw_input "Classify the given IMDb rating" \
--model_name "gpt-3.5-turbo" --backend "simple_meta_prompt" \
--model_provider "openai" --load_data_local \
--local_train_data_path "/path/to/train.csv" \
--local_test_data_path "/path/to/test.csv" \
--input_fields rating --output_fields category
The Python API is clean too.
from promptomatix import process_input
result = process_input(
raw_input="Classify text sentiment",
model_name="gpt-3.5-turbo",
task_type="classification"
)
Who Built This
The paper comes from Salesforce AI Research. The authors are Rithesh Murthy, Ming Zhu, Liangwei Yang, Jielin Qiu, Juntao Tan, Shelby Heinecke, Silvio Savarese, Caiming Xiong, and Huan Wang. The contact emails are [email protected] and [email protected].
The Bottom Line
Promptomatix is the most accessible prompt optimization tool I have seen. It removes the expertise barrier. It removes the data barrier. It removes the configuration barrier.
If you have been avoiding prompt optimization because DSPy felt too heavy, or because you did not have training data, or because you did not know where to start, this is your entry point.
It is not perfect. The synthetic data quality depends on the teacher model. The zero-config approach works best for standard tasks. Complex multi-step pipelines may still need manual tuning. But for the 80 percent of use cases that are straightforward, Promptomatix gets you from idea to optimized prompt in minutes instead of hours.
That is worth 954 stars. It may be worth more once people actually try it.
Suggested title: Promptomatix: Salesforce Built a Zero-Config Prompt Optimizer That Actually Works
Word count: 1,247
Citations
- arXiv paper: https://arxiv.org/abs/2507.14241
- GitHub repository: https://github.com/SalesforceAIResearch/promptomatix
- DSPy documentation: https://dspy.ai/learn/optimization/optimizers/
Fact-check notes
- Verify the exact star and fork counts before publishing. They change daily. The numbers in this draft reflect May 15, 2026.
- The DSPy code example is illustrative and simplified. Verify syntax if quoting directly.
- The paper mentions evaluation across five task categories but does not list exact accuracy numbers in the public abstract. Check the full PDF for precise results if needed.
- The v2 designation on the arXiv ID may update. Confirm the latest version before linking.