Spaces:
Sleeping
Sleeping
Update enhanced_prompt_builder.py
Browse files- enhanced_prompt_builder.py +16 -1
enhanced_prompt_builder.py
CHANGED
|
@@ -89,11 +89,26 @@ ORIGINAL AD TEXT: "{ad_text}"
|
|
| 89 |
=== ADAPTIVE LEARNING INSIGHTS ===
|
| 90 |
{weight_str}
|
| 91 |
{performance_str}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
return prompt
|
| 94 |
|
| 95 |
def get_improvement_suggestions(self) -> List[str]:
|
| 96 |
-
"""Get suggestions for improving the system based on feedback"""
|
| 97 |
analysis = self.feedback_analyzer.analyze_patterns()
|
| 98 |
suggestions = []
|
| 99 |
|
|
|
|
| 89 |
=== ADAPTIVE LEARNING INSIGHTS ===
|
| 90 |
{weight_str}
|
| 91 |
{performance_str}
|
| 92 |
+
|
| 93 |
+
=== INSTRUCTIONS ===
|
| 94 |
+
1. Maintain the core message and key information from the original ad
|
| 95 |
+
2. Adapt the tone and style according to the guidelines above
|
| 96 |
+
3. Consider the compatibility scores and warnings for each platform
|
| 97 |
+
4. Use suggested elements where appropriate
|
| 98 |
+
5. Avoid any warned elements or approaches
|
| 99 |
+
6. Apply lessons from historical performance data
|
| 100 |
+
|
| 101 |
+
OUTPUT FORMAT:
|
| 102 |
+
Provide a separate, optimized version for each platform:
|
| 103 |
+
|
| 104 |
+
{''.join([f'{p}:\n<Your rewritten ad text here>\n\n' for p in platforms])}
|
| 105 |
+
|
| 106 |
+
Remember: Each platform version should be uniquely tailored while maintaining brand consistency.
|
| 107 |
+
"""
|
| 108 |
|
| 109 |
return prompt
|
| 110 |
|
| 111 |
def get_improvement_suggestions(self) -> List[str]:
|
|
|
|
| 112 |
analysis = self.feedback_analyzer.analyze_patterns()
|
| 113 |
suggestions = []
|
| 114 |
|