Vedant-HK/PROSE — reverse-engineered prompt
Reverse engineered prompt
Build me a working Flask API that takes a rough prompt and returns a better optimized version. The project is already meant to be a prompt optimizer using a mix of machine learning and a genetic algorithm, but the main service logic still needs to be filled in.
Please make the POST /optimize_prompt endpoint actually work. It should accept a prompt, analyze it, choose an optimization strategy, generate improved prompt candidates, score them, and return the best result with a clear response that includes the original prompt, optimized prompt, selected strategy, score, and any helpful notes. Keep the code clean and easy to test, using the existing app factory, routing, schemas, and service structure.
If the ML model is only a simple Random Forest for now, that’s fine. Use sensible placeholder training data if needed so the API runs locally without extra setup. Add basic validation, error handling, and a quick example request so I can test it right away.
Want more depth? Deep Reverse