This project implements a local PROSE-style prompt optimizer based on the referenced paper, including:
- Flask web UI and
/optimize_promptAPI - Rule-based, ML-guided, and GA-inspired candidate generation
- Evaluation metrics for semantic fidelity, clarity, readability, token efficiency, and improvement
- A synthetic 200-prompt training dataset following the paper's 8-domain setup
- A local TF-IDF + Logistic Regression predictor for domain, mode, strategy, and ambiguity
python app.pyOpen http://127.0.0.1:5000.
python training/generate_dataset.pyThis creates data/prose_training_prompts.csv with 200 prompts across:
General, Education, Coding, Writing, Summarization, Reasoning, Technical/Data, and Business/Finance.
python training/train_model.pyThis creates:
models/prose_predictor.joblibmodels/training_report.txt
The app automatically uses the trained model when models/prose_predictor.joblib exists.