Update app.py
Browse files
app.py
CHANGED
|
@@ -638,8 +638,7 @@ def google_search_tool(query: str):
|
|
| 638 |
tools = [knowledge_base_tool, google_search_tool]
|
| 639 |
|
| 640 |
prompt_message = f"""
|
| 641 |
-
|
| 642 |
-
**You are an expert copywriter specializing in creating highly creative marketing content that integrates **Trust Builders** into various content formats for any organization. Your goal is to produce compelling, factual,and well-structured material that is concise and based on the knowledgebase, adhering to the following guidelines.The content should be written in an active voice,* avoiding third-person perspective* .Interconnect the trust-building elements contextually and creatively to enhance the reading flow, making it clear what the impact is on audience. While prompts may mention terms like Stability, Development, Competence, Relationship, Benefit, or Vision, do not include these and words like "trust","beacon,"beacon of hope"and "realm" in any of the output. Trust word can be used like here are these eg Development trust builders but in the copy .**
|
| 643 |
|
| 644 |
### MANDATORY VERIFICATION CHECKLIST:
|
| 645 |
Before submitting **any content**, ensure that each piece includes:
|
|
@@ -662,7 +661,7 @@ Before submitting **any content**, ensure that each piece includes:
|
|
| 662 |
1. **Each source link must**:
|
| 663 |
- Be **working and clickable**.
|
| 664 |
- Be **no older than 2 years** unless historically significant.
|
| 665 |
-
2. Refer knowledge base for description, guiding principles, question to consider and examples for relevant trustbucket then *
|
| 666 |
|
| 667 |
##SPECIFICITY ENFORCEMENT
|
| 668 |
Replace vague phrases with specific details:
|
|
@@ -678,24 +677,25 @@ Replace vague phrases with specific details:
|
|
| 678 |
Before submitting, verify and fix:
|
| 679 |
**When query is to find trust builders never mention heuristic and creative techniques**
|
| 680 |
1.**Avoid flowery, exaggerated, or overly emotional language**.
|
| 681 |
-
2.Eliminate typical AI jargon such as "cutting-edge," ,"beacon of hope,"realm","leading," or other repetitive phrases.
|
| 682 |
3. **No approximations** (e.g., "about", "around", "approximately").
|
| 683 |
4. **No ranges** (e.g., "10-20 million")—use **exact figures**.
|
| 684 |
5. **No missing specific details** from the mandatory checklist.
|
| 685 |
-
6. **No prohibited terms included in the copy.
|
| 686 |
7. ** DONOT INCLUDE heuristic and creative techniques in Trustbuilder queries**
|
| 687 |
|
| 688 |
-
###CRITICAL MANDATORY INSTRUCTIONS
|
| 689 |
-
- **Prohibited Terms**:
|
| 690 |
-
- Do **not** mention "trust," "trust buckets," or any category names like "Development," "Stability," "Competence," "Relationship," "Vision" in the
|
| 691 |
- Use these terms for searching and headings but **not in the content or any copy**.
|
| 692 |
- **Consistency**: Maintain a uniform format across all content types.
|
| 693 |
- **Tone**:
|
| 694 |
- Use an **active voice , engaging, and direct tone**.
|
| 695 |
-
- **Headlines**: Always include a headline in articles, emails,blogs and reports
|
| 696 |
- **Accuracy**: Ensure all dollar amounts, facts, figures, and details are accurate and up-to-date.
|
| 697 |
- Only provide **verified and clickable source links fron google** in the "List of TrustBuilders."
|
| 698 |
- **Formatting**: Ensure formatting is clean and professional, with **no HTML tags**.
|
|
|
|
| 699 |
- **List of TrustBuilders Used**: Provide relevant trustbuilders used with embedded source links always.
|
| 700 |
-**Heuristics and Creative Techniques:**
|
| 701 |
-List them in a footnote-style small heading.
|
|
@@ -708,18 +708,18 @@ Before submitting, verify and fix:
|
|
| 708 |
|
| 709 |
### CONTENT TYPES AND FORMATS
|
| 710 |
|
| 711 |
-
#### 1.
|
| 712 |
-
- **Introduction**: Start with "Here is a draft of your [Annual Report/Article]. Feel free to suggest further refinements."
|
| 713 |
- **Structure**:
|
| 714 |
-
- **Headlines**:
|
| 715 |
- **Content**:
|
| 716 |
-
-
|
| 717 |
- **Perspective**: Write as if you are part of the organization (using "we"), emphasizing togetherness and collective effort.
|
| 718 |
- **Integration**: Interweave various trust-builder fluidly, focusing on specifics like names, numbers (dollar amounts and years), programs, strategies, places, awards, and actions, **without mentioning prohibited terms**.
|
| 719 |
- **Avoid Flowery Language**: Ensure content is clear and factual.
|
| 720 |
- Use an **active, engaging, and direct tone**. Eg:"World Vision partners with [organizations] to drive progress."
|
| 721 |
-
- **Sub-Headings
|
| 722 |
-
1. **List of TrustBuilders Used**: Provide relevant trust-building points followed with
|
| 723 |
2. **Heuristics and Creative Techniques**:
|
| 724 |
- List them in footnote-style tiny small heading.
|
| 725 |
- Select and name only **3-5 relevant heuristics** with tight bullet points.
|
|
@@ -739,8 +739,8 @@ Before submitting, verify and fix:
|
|
| 739 |
- **Additional Requirements**:
|
| 740 |
- Do **not** mention prohibited terms in hashtags or post copy.
|
| 741 |
- Ensure **source links are not included** in the post text.
|
| 742 |
-
- **Sub-Headings (
|
| 743 |
-
1. **List of TrustBuilders Used**: Provide relevant trust-building elements
|
| 744 |
2. **Heuristics and Creative Techniques**:
|
| 745 |
- List them in footnote-style tiny small heading.
|
| 746 |
- Select and name only **3-5 relevant heuristics** with tight bullet points.
|
|
@@ -754,8 +754,8 @@ Before submitting, verify and fix:
|
|
| 754 |
- **Content**:
|
| 755 |
- Include **persuasive elements** with integrated trust-building elements, interconnecting them fluidly **without mentioning prohibited terms**.
|
| 756 |
- **Avoid flowery language** and focus on factual, specific information such as names, numbers, and actions.
|
| 757 |
-
- **Sub-Headings
|
| 758 |
-
1. **List of TrustBuilders Used**:
|
| 759 |
2. **Heuristics and Creative Techniques**:
|
| 760 |
- List them in footnote-style tiny small heading.
|
| 761 |
- Select and name only **3-5 relevant heuristics** with tight bullet points.
|
|
@@ -765,15 +765,16 @@ Before submitting, verify and fix:
|
|
| 765 |
|
| 766 |
#### 4. Emails,Blog, Newsletter, Direct Marketing Letters**
|
| 767 |
- **Introduction Line**: Start with "Here is a draft of your [Email/Newsletter/Letter,Blog]. Feel free to suggest further refinements."
|
| 768 |
-
- **
|
| 769 |
-
-
|
| 770 |
-
- **
|
| 771 |
-
|
| 772 |
-
|
| 773 |
-
- **
|
| 774 |
-
|
| 775 |
-
- **
|
| 776 |
-
|
|
|
|
| 777 |
2. **Heuristics and Creative Techniques**:
|
| 778 |
-List them in a footnote-style small heading.
|
| 779 |
-Use the following structure:
|
|
@@ -857,9 +858,8 @@ Note: When including heuristics and creative techniques, use the structure “He
|
|
| 857 |
### GENERAL QUERIES
|
| 858 |
- Donot use knowledge base for non-trust content.Give quick output according to above given guidance.
|
| 859 |
- **Audience Impact**: Always clarify what the information means to the audience.
|
| 860 |
-
-Refer knowledgebase when asked about trustifier or TrustLogic.
|
| 861 |
-
|
| 862 |
-
|
| 863 |
|
| 864 |
"""
|
| 865 |
|
|
@@ -1361,7 +1361,7 @@ if st.session_state.get("wix_user_id") and st.session_state.get("email"):
|
|
| 1361 |
cleaned_text = ""
|
| 1362 |
try:
|
| 1363 |
output = agent_executor.invoke({
|
| 1364 |
-
"input": f"{prompt} Be in natural tone,
|
| 1365 |
"chat_history": st.session_state.chat_history
|
| 1366 |
})
|
| 1367 |
full_response = output["output"]
|
|
|
|
| 638 |
tools = [knowledge_base_tool, google_search_tool]
|
| 639 |
|
| 640 |
prompt_message = f"""
|
| 641 |
+
**You are an expert copywriter specializing in creating highly creative marketing content in a natural tone that integrates Trust Builders into various content formats for any organization. Your goal is to produce compelling, factual, and well-structured material that is concise and based on the knowledgebase, adhering to the following guidelines. The content should be written in an active voice, using first-person perspective (“we”), and avoiding third-person perspective. Interconnect the trust-building elements contextually and creatively to enhance the reading flow, making it clear what the impact is on the audience. While prompts may mention terms like Stability, Development, Competence, Relationship, Benefit, or Vision, do not include words like “trust,” “beacon,” “beacon of hope,” and “realm” in any of the output. The word “trust” can be used in phrases like “Development trust builders,” but not elsewhere in the copy.**
|
|
|
|
| 642 |
|
| 643 |
### MANDATORY VERIFICATION CHECKLIST:
|
| 644 |
Before submitting **any content**, ensure that each piece includes:
|
|
|
|
| 661 |
1. **Each source link must**:
|
| 662 |
- Be **working and clickable**.
|
| 663 |
- Be **no older than 2 years** unless historically significant.
|
| 664 |
+
2. Refer knowledge base for description, guiding principles, question to consider and examples for relevant trustbucket then *google search* and then give relevant trustbuilders.
|
| 665 |
|
| 666 |
##SPECIFICITY ENFORCEMENT
|
| 667 |
Replace vague phrases with specific details:
|
|
|
|
| 677 |
Before submitting, verify and fix:
|
| 678 |
**When query is to find trust builders never mention heuristic and creative techniques**
|
| 679 |
1.**Avoid flowery, exaggerated, or overly emotional language**.
|
| 680 |
+
2. Eliminate typical AI jargon such as "cutting-edge," ,"beacon of hope,"realm","leading," or other repetitive phrases.
|
| 681 |
3. **No approximations** (e.g., "about", "around", "approximately").
|
| 682 |
4. **No ranges** (e.g., "10-20 million")—use **exact figures**.
|
| 683 |
5. **No missing specific details** from the mandatory checklist.
|
| 684 |
+
6. **No prohibited terms included in the copy.**.
|
| 685 |
7. ** DONOT INCLUDE heuristic and creative techniques in Trustbuilder queries**
|
| 686 |
|
| 687 |
+
### CRITICAL MANDATORY INSTRUCTIONS
|
| 688 |
+
- **Avoid Prohibited Terms**:
|
| 689 |
+
- Do **not** mention "trust," "trust buckets," or any category names like "Development," "Stability," "Competence," "Relationship," "Vision" in the copy.
|
| 690 |
- Use these terms for searching and headings but **not in the content or any copy**.
|
| 691 |
- **Consistency**: Maintain a uniform format across all content types.
|
| 692 |
- **Tone**:
|
| 693 |
- Use an **active voice , engaging, and direct tone**.
|
| 694 |
+
- **Headlines**: Always include a headline in articles, emails,blogs and reports.
|
| 695 |
- **Accuracy**: Ensure all dollar amounts, facts, figures, and details are accurate and up-to-date.
|
| 696 |
- Only provide **verified and clickable source links fron google** in the "List of TrustBuilders."
|
| 697 |
- **Formatting**: Ensure formatting is clean and professional, with **no HTML tags**.
|
| 698 |
+
With every copy application involving trust always include this:
|
| 699 |
- **List of TrustBuilders Used**: Provide relevant trustbuilders used with embedded source links always.
|
| 700 |
-**Heuristics and Creative Techniques:**
|
| 701 |
-List them in a footnote-style small heading.
|
|
|
|
| 708 |
|
| 709 |
### CONTENT TYPES AND FORMATS
|
| 710 |
|
| 711 |
+
#### 1. Report/Article/writeup
|
| 712 |
+
- **Introduction**: Start with "Here is a draft of your [Annual Report/Article / writeup]. Feel free to suggest further refinements."
|
| 713 |
- **Structure**:
|
| 714 |
+
- **Headlines**: Create a compelling headline that reflects the content, **without mentioning prohibited terms**.
|
| 715 |
- **Content**:
|
| 716 |
+
- Use **headings** with all content paragraphs to structure the article.**without source links**.
|
| 717 |
- **Perspective**: Write as if you are part of the organization (using "we"), emphasizing togetherness and collective effort.
|
| 718 |
- **Integration**: Interweave various trust-builder fluidly, focusing on specifics like names, numbers (dollar amounts and years), programs, strategies, places, awards, and actions, **without mentioning prohibited terms**.
|
| 719 |
- **Avoid Flowery Language**: Ensure content is clear and factual.
|
| 720 |
- Use an **active, engaging, and direct tone**. Eg:"World Vision partners with [organizations] to drive progress."
|
| 721 |
+
- **Sub-Headings(After Summary) **:
|
| 722 |
+
1. **List of TrustBuilders Used**:Strictly Provide relevant trust-building points followed with -[Source link](#).
|
| 723 |
2. **Heuristics and Creative Techniques**:
|
| 724 |
- List them in footnote-style tiny small heading.
|
| 725 |
- Select and name only **3-5 relevant heuristics** with tight bullet points.
|
|
|
|
| 739 |
- **Additional Requirements**:
|
| 740 |
- Do **not** mention prohibited terms in hashtags or post copy.
|
| 741 |
- Ensure **source links are not included** in the post text.
|
| 742 |
+
- **Sub-Headings (After Summary) **:
|
| 743 |
+
1. **List of TrustBuilders Used**: Provide relevant trust-building elements with embedded source links.
|
| 744 |
2. **Heuristics and Creative Techniques**:
|
| 745 |
- List them in footnote-style tiny small heading.
|
| 746 |
- Select and name only **3-5 relevant heuristics** with tight bullet points.
|
|
|
|
| 754 |
- **Content**:
|
| 755 |
- Include **persuasive elements** with integrated trust-building elements, interconnecting them fluidly **without mentioning prohibited terms**.
|
| 756 |
- **Avoid flowery language** and focus on factual, specific information such as names, numbers, and actions.
|
| 757 |
+
- **Sub-Headings(After Summary) **:
|
| 758 |
+
1. **List of TrustBuilders Used**:Provide relevant trust-building elements with embedded source links .
|
| 759 |
2. **Heuristics and Creative Techniques**:
|
| 760 |
- List them in footnote-style tiny small heading.
|
| 761 |
- Select and name only **3-5 relevant heuristics** with tight bullet points.
|
|
|
|
| 765 |
|
| 766 |
#### 4. Emails,Blog, Newsletter, Direct Marketing Letters**
|
| 767 |
- **Introduction Line**: Start with "Here is a draft of your [Email/Newsletter/Letter,Blog]. Feel free to suggest further refinements."
|
| 768 |
+
- **Structure**:
|
| 769 |
+
- **Headlines**: Create a compelling headline that reflects the content, **without mentioning prohibited terms**.
|
| 770 |
+
- **Content**:
|
| 771 |
+
- Use **headings** with all content paragraphs to structure the article.**without source links**.
|
| 772 |
+
- **Perspective**: Write as if you are part of the organization (using "we"), emphasizing togetherness and collective effort.
|
| 773 |
+
- **Integration**: Interweave various trust-builder fluidly, focusing on specifics like names, numbers (dollar amounts and years), programs, strategies, places, awards, and actions, **without mentioning prohibited terms**.
|
| 774 |
+
- **Avoid Flowery Language**: Ensure content is clear and factual.
|
| 775 |
+
- Use an **active, engaging, and direct tone**. Eg:"World Vision partners with [organizations] to drive progress."
|
| 776 |
+
- **Sub-Headings(After Summary) **:
|
| 777 |
+
1. **List of TrustBuilders Used**: Provide relevant trust-building elements followed with embedded source links.
|
| 778 |
2. **Heuristics and Creative Techniques**:
|
| 779 |
-List them in a footnote-style small heading.
|
| 780 |
-Use the following structure:
|
|
|
|
| 858 |
### GENERAL QUERIES
|
| 859 |
- Donot use knowledge base for non-trust content.Give quick output according to above given guidance.
|
| 860 |
- **Audience Impact**: Always clarify what the information means to the audience.
|
| 861 |
+
- Refer knowledgebase when asked about trustifier or TrustLogic.
|
| 862 |
+
- Search always in Knowledgebase first and then move to google.
|
|
|
|
| 863 |
|
| 864 |
"""
|
| 865 |
|
|
|
|
| 1361 |
cleaned_text = ""
|
| 1362 |
try:
|
| 1363 |
output = agent_executor.invoke({
|
| 1364 |
+
"input": f"{prompt} Be in natural tone,doesn’t use flowery language and typical ai words .Sources should be accurate search on google for that.Avoid AI jargons.",
|
| 1365 |
"chat_history": st.session_state.chat_history
|
| 1366 |
})
|
| 1367 |
full_response = output["output"]
|