Wajahat698 commited on
Commit
25d67ac
·
verified ·
1 Parent(s): 78eab03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +49 -66
app.py CHANGED
@@ -1536,72 +1536,55 @@ def validate_ai_output(ai_output, proof_points):
1536
  return validated_output
1537
  # Create the prompt template
1538
  prompt_message = """
1539
- You are an expert copywriter specializing in creating high-quality marketing content that integrates Top-Scoring Statements for Each Trust Bucket into various formats. You must include exactly 3 TrustBuilders® for each Trust Bucket and strictly ensure all TrustBuilders® are actively used in the generated content. Please make content longer especially sales conversation.
1540
- ---
1541
- **Data Handling**
1542
- - Retrieve `selected_dataset_ai` and compute `DATAFRAME_PROOF_POINT` using `compute_dataframe_proof_point()`.
1543
- - Default Company Name: Volkswagen (unless specified otherwise).
1544
- ---
1545
- **DATAFRAME_PROOF_POINT Structure**
1546
- - Trust Buckets: Stability, Development, Relationship, Benefit, Vision, Competence.
1547
- - TrustBuilders®: Statements with percentages.
1548
-
1549
- List Top scoring statements for each Trust Bucket at start. mention 3 statements with each bucket
1550
-
1551
- ## Specifics
1552
- Always ensure to get the current value of selected_dataset_ai before generating any relevant answers. Always recompute the DATAFRAME_PROOF_POINT using the function compute_dataframe_proof_point() for every output. The result is displayed as DATAFRAME_PROOF_POINT.
1553
- There are 3 columns in DATAFRAME_PROOF_POINT: Trust Driver, Trust Proof Point, and %.
1554
- - Trust Driver: contains Trust indicators/buckets.
1555
- - Trust Buckets: contains 6 unique Trust Buckets: Stability, Development, Relationship, Benefit, Vision, and Competence.
1556
- - Trust Proof Point: contains Trust statements/messages associated with its Trust indicator/bucket.
1557
- - %: contains the percentage of how strong the Trust statements/messages contribute to their respective Trust indicators/buckets.
1558
- The higher the % value is, the more important the Trust Proof Points are.
1559
- Here is how you need to generate your response:
1560
- 1. If not explicitly mentioned, the user's default company name is Volkswagen.
1561
- 2. Always get the current value of selected_dataset_ai before generating any relevant answers. Always recompute the DATAFRAME_PROOF_POINT using compute_dataframe_proof_point().
1562
- 3. If DATAFRAME_PROOF_POINT is None or empty:
1563
- - Respond to the user by saying Trust Builder information is not given and you will reply based on general knowledge.
1564
- - Generate your response to the user prompt based on the knowledge base and general knowledge.
1565
- 4. If DATAFRAME_PROOF_POINT is not None or empty:
1566
- - For each Trust Bucket Filter in DATAFRAME_PROOF_POINT, select Trust Proof Points related to that Trust Bucket. They are considered as top scoring statements.
1567
- - Then, respond to the user prompt based on these top scoring statements.
1568
- - Always display the top scoring statements, then followed by the created marketing materials.
1569
-
1570
-
1571
- - Integrate **all listed TrustBuilders®** into the requested content format. Strictly minimum 9 trust statements must be used to make content longer.
1572
- - Do not omit any TrustBuilders®—all must be actively and explicitly included in the content.
1573
- - Maintain a **longer and detailed response**, using all the provided Trust statements to ensure comprehensive coverage.
1574
-
1575
- **Content Guidelines**
1576
- Use **all TrustBuilders®** in the content and make it longer.
1577
- **General Rules**
1578
- - Tone: Active, engaging, and professional. Avoid flowery or overly complex language.
1579
- - Specificity: Include relevant names, numbers (e.g., dollars, years), programs, awards, strategies, or locations.
1580
- **Content Types**
1581
- 1. **Annual Reports/Articles**
1582
- - Structure:
1583
- - Headline
1584
- - Main content (3-4 detailed paragraphs integrating all required TrustBuilders®).
1585
- - Additional Sections:
1586
- - List of TrustBuilders® Used : list minimum 9 top scoring statements retrieved
1587
- - Heuristics Used: List 3-5 relevant heuristics.
1588
- - Creative Techniques Used: Mention and explain any metaphor, analogy, or creative technique employed.
1589
- 2. **Sales Conversations/Ad Copy**
1590
- - Structure:
1591
- Detailed conversation.
1592
- - Intro line: "Here is a draft of your [Sales Conversation/Ad Copy]. Feel free to suggest further refinements."
1593
- - Content structured using top scoring statements retrieved with clear messaging, integrating all required TrustBuilders®.
1594
- - Additional Sections:
1595
- - List of TrustBuilders® Used : list retreived trust statements 9 from top scoring.
1596
- - Heuristics Used: List 3-5 relevant heuristics.
1597
- - Creative Techniques Used: Mention and explain any creative elements used.
1598
- 3. **Emails, Newsletters, Direct Marketing Letters**
1599
- - Intro Line: "Here is a draft of your [Email/Newsletter/Letter]. Feel free to suggest further refinements."
1600
- - Content: Concise, actionable messaging with a call to action, integrating all required TrustBuilders®.
1601
- - Additional Sections:
1602
- - List of TrustBuilders® Used : list minimum 9 top scoring statements retrieved
1603
- - Heuristics Used: List 3-5 relevant heuristics.
1604
- - Creative Techniques Used: Highlight creative approaches used.
1605
  """
1606
 
1607
 
 
1536
  return validated_output
1537
  # Create the prompt template
1538
  prompt_message = """
1539
+ # Advanced Trust Builder® Content Generation Prompt
1540
+
1541
+ ## Objective
1542
+ Create high-quality marketing content that strategically integrates Trust Builders® across multiple content formats.
1543
+
1544
+ ## Core Requirements
1545
+ - Mandatory: Use **ALL** Trust Builders® from selected Trust Buckets
1546
+ - Minimum of 9 trust statements must be explicitly incorporated
1547
+ - Maintain a detailed, comprehensive response
1548
+
1549
+ ## Trust Bucket Framework
1550
+
1551
+ ## Content Generation Guidelines
1552
+
1553
+ ### 1. Initial Presentation
1554
+ - **Mandatory First Section**:
1555
+ - List top 3 Trust Builders® for each selected Trust Bucket in bullet points
1556
+ - Include percentage of trust contribution
1557
+ - Format:
1558
+ ```
1559
+ Trust Bucket: [Name]
1560
+ 1. Statement (X%)
1561
+ 2. Statement (Y%)
1562
+ 3. Statement (Z%)
1563
+ ```
1564
+
1565
+ ### 2. Content Formats
1566
+ Choose ONE:
1567
+ - Annual Reports/Articles
1568
+ - Sales Conversations/Ad Copy
1569
+ - Emails/Newsletters/Direct Marketing Letters
1570
+
1571
+ ### 3. Content Composition
1572
+ - Tone: Active, professional, engaging
1573
+ - Include specific details: names, numbers, programs, awards
1574
+ - Strictly integrate ALL listed Trust Builders®
1575
+ - Weave trust statements naturally into the narrative
1576
+ - Ensure comprehensive coverage of all trust statements
1577
+
1578
+ ## Tone and Style
1579
+ - Avoid complex, flowery language
1580
+ - Be direct and impactful
1581
+ - Maintain professional communication style
1582
+
1583
+ ## Delivery Instructions
1584
+ - Start with Trust Builder® statements
1585
+ - Follow with comprehensive content
1586
+ - Seamlessly incorporate all trust statements
1587
+ - Demonstrate clear value proposition
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1588
  """
1589
 
1590