Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1233,24 +1233,13 @@ tools = [
|
|
| 1233 |
]
|
| 1234 |
|
| 1235 |
prompt_message = f"""
|
| 1236 |
-
**You are an expert multilingual copywriter specializing in creating highly fluid, compelling, and interconnected marketing copy that seamlessly integrates Trust Builders into various content formats. Your goal is to craft concise, engaging material based on the knowledgebase, adhering to the following guidelines:**
|
| 1237 |
|
| 1238 |
- Write in **active voice** using **first-person perspective (“we”)**, avoiding third-person.
|
| 1239 |
- Ensure **seamless flow** with logical transitions between paragraphs, maintaining relevance and consistency.
|
| 1240 |
- Contextually integrate trust-building elements creatively. Avoid using **Stability, Development, Competence, Relationship, Benefit, Vision**, and the terms **“trust,” “beacon,” “beacon of hope,” “realm”**, except in specific phrases like **“Development trust builders.”**
|
| 1241 |
- Focus on clarity, avoiding jargon or repetition while emphasizing impact on the audience.
|
| 1242 |
|
| 1243 |
-
**Top Trust Builders**:
|
| 1244 |
-
- When asked about top trust builders or trust builders for key trust drivers find exactly like this use knowledgebase only dont use google. :
|
| 1245 |
-
- Provide same all statements present in knowledgebase with headings,
|
| 1246 |
-
Top Trust Builders for [Audience/Query Context]:
|
| 1247 |
-
[Trust Driver Name]:
|
| 1248 |
-
- [Statements from knowledgebase]
|
| 1249 |
-
...
|
| 1250 |
-
[Next Trust Driver Name]:
|
| 1251 |
-
- [Statements from knowledgebase]
|
| 1252 |
-
...
|
| 1253 |
-
|
| 1254 |
### MANDATORY VERIFICATION CHECKLIST:
|
| 1255 |
Before submitting **any content**, ensure that each piece includes:
|
| 1256 |
1. **Specific Details**:
|
|
@@ -1271,6 +1260,7 @@ Before submitting **any content**, ensure that each piece includes:
|
|
| 1271 |
*SOURCE LINK*
|
| 1272 |
1. **Each source link must**:
|
| 1273 |
-Be Latest, factual and verifiable not page not found links please.
|
|
|
|
| 1274 |
2. Refer knowledge base for description, guiding principles, question to consider and examples for relevant trustbucket then *google search* and then give relevant trustbuilders.
|
| 1275 |
|
| 1276 |
##SPECIFICITY ENFORCEMENT
|
|
@@ -1451,7 +1441,6 @@ Note: When including heuristics and creative techniques, use the structure “He
|
|
| 1451 |
"MOST IMPORTANT RULE. IN EVERY PARAGRAPH Strengthen the connections between sections to ensure smoother flow and SHOULD BE DEEPLY INTERCONNECTED WITH EACH OTHER TO CREATE A SEAMLESS FLOW, MAKING THE CONTENT READ LIKE A SINGLE CONTENT RATHER THAN DISJOINTED PARAGRAPHS OR INDEPENDENT BLOG SECTIONS. EACH SECTION MUST LOGICALLY TRANSITION INTO THE NEXT, ENSURING THAT THE TOPIC REMAINS CONSISTENT AND RELEVANT THROUGHOUT. BY MAINTAINING A COHESIVE STRUCTURE, THE ARTICLE WILL ENGAGE READERS MORE EFFECTIVELY, HOLDING THEIR ATTENTION AND CONVEYING THE INTENDED MESSAGE WITH CLARITY AND IMPACT."
|
| 1452 |
|
| 1453 |
"""
|
| 1454 |
-
|
| 1455 |
prompt_template = ChatPromptTemplate.from_messages([
|
| 1456 |
("system", prompt_message),
|
| 1457 |
MessagesPlaceholder(variable_name="chat_history"),
|
|
@@ -2156,18 +2145,24 @@ def handle_prompt(prompt):
|
|
| 2156 |
add_dot_typing_animation()
|
| 2157 |
display_typing_indicator()
|
| 2158 |
cleaned_text = ""
|
| 2159 |
-
base_instructions = """
|
| 2160 |
-
|
| 2161 |
-
|
| 2162 |
-
|
| 2163 |
-
|
| 2164 |
-
|
| 2165 |
-
|
| 2166 |
-
|
| 2167 |
-
|
| 2168 |
-
|
| 2169 |
-
|
| 2170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2171 |
"""
|
| 2172 |
|
| 2173 |
|
|
@@ -2192,9 +2187,10 @@ def handle_prompt(prompt):
|
|
| 2192 |
" -Heuristics: Mention names only like examples (e.g., social proof, authority, commitment)."
|
| 2193 |
" -Creative Techniques: Mention names onlyexamples (list only relevant marketing techniques without additional details)."
|
| 2194 |
"The final output must not include AI jargons.*With every paragraph give a creative headline that summarises the content give sub-headlines with each paragraph like example headline: We Empower or Similar Phrases.* Avoid mentioning trustbucket names."
|
| 2195 |
-
"MOST IMPORTANT RULE. EVERY PARAGRAPH SHOULD BE DEEPLY
|
|
|
|
| 2196 |
|
| 2197 |
-
|
| 2198 |
else:
|
| 2199 |
appended_instructions = ""
|
| 2200 |
final_prompt = f"{prompt} {base_instructions} {appended_instructions}"
|
|
|
|
| 1233 |
]
|
| 1234 |
|
| 1235 |
prompt_message = f"""
|
| 1236 |
+
**You are an expert multilingual copywriter specializing in creating highly fluid, compelling, and interconnected marketing copy that seamlessly integrates Trust Builders into various content formats for any organization. Your goal is to craft concise, engaging material based on the knowledgebase, adhering to the following guidelines:**
|
| 1237 |
|
| 1238 |
- Write in **active voice** using **first-person perspective (“we”)**, avoiding third-person.
|
| 1239 |
- Ensure **seamless flow** with logical transitions between paragraphs, maintaining relevance and consistency.
|
| 1240 |
- Contextually integrate trust-building elements creatively. Avoid using **Stability, Development, Competence, Relationship, Benefit, Vision**, and the terms **“trust,” “beacon,” “beacon of hope,” “realm”**, except in specific phrases like **“Development trust builders.”**
|
| 1241 |
- Focus on clarity, avoiding jargon or repetition while emphasizing impact on the audience.
|
| 1242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1243 |
### MANDATORY VERIFICATION CHECKLIST:
|
| 1244 |
Before submitting **any content**, ensure that each piece includes:
|
| 1245 |
1. **Specific Details**:
|
|
|
|
| 1260 |
*SOURCE LINK*
|
| 1261 |
1. **Each source link must**:
|
| 1262 |
-Be Latest, factual and verifiable not page not found links please.
|
| 1263 |
+
|
| 1264 |
2. Refer knowledge base for description, guiding principles, question to consider and examples for relevant trustbucket then *google search* and then give relevant trustbuilders.
|
| 1265 |
|
| 1266 |
##SPECIFICITY ENFORCEMENT
|
|
|
|
| 1441 |
"MOST IMPORTANT RULE. IN EVERY PARAGRAPH Strengthen the connections between sections to ensure smoother flow and SHOULD BE DEEPLY INTERCONNECTED WITH EACH OTHER TO CREATE A SEAMLESS FLOW, MAKING THE CONTENT READ LIKE A SINGLE CONTENT RATHER THAN DISJOINTED PARAGRAPHS OR INDEPENDENT BLOG SECTIONS. EACH SECTION MUST LOGICALLY TRANSITION INTO THE NEXT, ENSURING THAT THE TOPIC REMAINS CONSISTENT AND RELEVANT THROUGHOUT. BY MAINTAINING A COHESIVE STRUCTURE, THE ARTICLE WILL ENGAGE READERS MORE EFFECTIVELY, HOLDING THEIR ATTENTION AND CONVEYING THE INTENDED MESSAGE WITH CLARITY AND IMPACT."
|
| 1442 |
|
| 1443 |
"""
|
|
|
|
| 1444 |
prompt_template = ChatPromptTemplate.from_messages([
|
| 1445 |
("system", prompt_message),
|
| 1446 |
MessagesPlaceholder(variable_name="chat_history"),
|
|
|
|
| 2145 |
add_dot_typing_animation()
|
| 2146 |
display_typing_indicator()
|
| 2147 |
cleaned_text = ""
|
| 2148 |
+
base_instructions = """
|
| 2149 |
+
*Be overly specific with details such as $dollar amounts, awards, people's names, and program titles*
|
| 2150 |
+
|
| 2151 |
+
1. **Focus on Knowledge Base Data**:
|
| 2152 |
+
- When asked using uploaded documents, files or using knowledgebase files, prioritize information fetch everything asked from there.
|
| 2153 |
+
- Provide answers based on the knowledge base content when relevant.
|
| 2154 |
+
|
| 2155 |
+
2. **Eliminate Flowery Language and AI Jargon**:
|
| 2156 |
+
- Avoid unnecessary technical terms and complex vocabulary.
|
| 2157 |
+
|
| 2158 |
+
3. **Provide Accurate, Factual Information with Valid Sources**:
|
| 2159 |
+
- When information is not available in the knowledge base, search on Google.
|
| 2160 |
+
- Always include valid and verifiable source links in your responses.for knowledgebase data also sources should be googled.
|
| 2161 |
+
|
| 2162 |
+
4. **Content Guidelines**:
|
| 2163 |
+
- Do **not** use trust bucket names (e.g., Stability Trust, Benefit Trust etc.) in content.
|
| 2164 |
+
- Strictly avoid mentioning them in your responses.
|
| 2165 |
+
|
| 2166 |
"""
|
| 2167 |
|
| 2168 |
|
|
|
|
| 2187 |
" -Heuristics: Mention names only like examples (e.g., social proof, authority, commitment)."
|
| 2188 |
" -Creative Techniques: Mention names onlyexamples (list only relevant marketing techniques without additional details)."
|
| 2189 |
"The final output must not include AI jargons.*With every paragraph give a creative headline that summarises the content give sub-headlines with each paragraph like example headline: We Empower or Similar Phrases.* Avoid mentioning trustbucket names."
|
| 2190 |
+
"MOST IMPORTANT RULE. EVERY PARAGRAPH SHOULD BE DEEPLY
|
| 2191 |
+
|
| 2192 |
|
| 2193 |
+
)
|
| 2194 |
else:
|
| 2195 |
appended_instructions = ""
|
| 2196 |
final_prompt = f"{prompt} {base_instructions} {appended_instructions}"
|