Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1345,6 +1345,10 @@ Be over specific with numbers,names,dollars, programs ,awards and action.
|
|
| 1345 |
- Do not use the knowledge base for non-trust content.
|
| 1346 |
- Always clarify the audience impact and ensure all information is based on verified sources.
|
| 1347 |
-Refer knowledgebase when asked about trustifier or TrustLogic.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1348 |
"""
|
| 1349 |
|
| 1350 |
prompt_template = ChatPromptTemplate.from_messages([
|
|
@@ -2076,11 +2080,10 @@ def handle_prompt(prompt):
|
|
| 2076 |
|
| 2077 |
|
| 2078 |
# Check if user request includes blog, article, or newsletter
|
| 2079 |
-
if any(keyword in prompt.lower() for keyword in ["blog", "article","annual report","report", "newsletter"]):
|
| 2080 |
appended_instructions = (
|
| 2081 |
-
"Strictly Avoid flowery language, typical AI phrases and jargons."
|
| 2082 |
"Craft a flawless, engaging, and fluid compelling copy using *non-flowery language* that reads as though written by a professional copywriter having 25 years of experience. "
|
| 2083 |
-
"Do not use AI jargon, vague phrases, or
|
| 2084 |
"1. **Interconnected Structure**: Ensure all sections and ideas flow seamlessly with logical transitions between paragraphs. Build a cohesive narrative where every part supports the overall theme, reinforcing the message at every step. "
|
| 2085 |
"3. **Seamless Integration of TrustBuilders®**: Naturally incorporate TrustBuilders® into the narrative without isolating or explicitly listing them in the main body. Instead, weave them fluidly into sentences to build credibility and trust while maintaining the content’s readability and engagement. "
|
| 2086 |
"4. **Human Tone**: Write in a relatable, conversational tone that engages the reader and feels natural. Avoid repetitive phrasing, overly technical explanations, or mechanical structures. Use active voice consistently, ensuring the tone is both approachable and professional."
|
|
@@ -2088,18 +2091,18 @@ def handle_prompt(prompt):
|
|
| 2088 |
"6. **Enhanced Audience Engagement**: Use storytelling techniques and mix the trustbuilders into a content. Begin with a compelling hook, maintain momentum through transitions, and conclude with a strong call-to-action that inspires the reader to act or reflect. "
|
| 2089 |
"7. **Purpose-Driven Impact**: Clearly define and achieve the content’s purpose—whether to inform, persuade, or inspire action. Ensure every paragraph serves the overall objective while reinforcing the key message. "
|
| 2090 |
"8. **Polished Presentation**: Ensure the final output is refined, professional, and suitable for publication. The copy should demonstrate mastery of language and content design, leaving no room for ambiguity or errors. "
|
| 2091 |
-
|
| 2092 |
-
"
|
| 2093 |
-
"1.
|
| 2094 |
-
" 2.
|
| 2095 |
" -List them in a footnote-style small heading."
|
| 2096 |
" Use the following structure:"
|
| 2097 |
" -Heuristics: Mention names only like examples (e.g., social proof, authority, commitment)."
|
| 2098 |
" -Creative Techniques: Mention names onlyexamples (list only relevant marketing techniques without additional details)."
|
| 2099 |
-
|
| 2100 |
-
"
|
| 2101 |
-
|
| 2102 |
-
|
| 2103 |
else:
|
| 2104 |
appended_instructions = ""
|
| 2105 |
final_prompt = f"{prompt} {base_instructions} {appended_instructions}"
|
|
|
|
| 1345 |
- Do not use the knowledge base for non-trust content.
|
| 1346 |
- Always clarify the audience impact and ensure all information is based on verified sources.
|
| 1347 |
-Refer knowledgebase when asked about trustifier or TrustLogic.
|
| 1348 |
+
-Resond user in the same language as user.
|
| 1349 |
+
|
| 1350 |
+
# MOST IMPORTANT RULES:
|
| 1351 |
+
- EVERY PARAGRAPH SHOULD BE INTERCONNECTED TO CREATE A SEAMLESS FLOW, MAKING THE CONTENT READ LIKE A SINGLE ARTICLE 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.
|
| 1352 |
"""
|
| 1353 |
|
| 1354 |
prompt_template = ChatPromptTemplate.from_messages([
|
|
|
|
| 2080 |
|
| 2081 |
|
| 2082 |
# Check if user request includes blog, article, or newsletter
|
| 2083 |
+
if any(keyword in prompt.lower() for keyword in ["blog", "article","annual report","report", "newsletter","website introduction"]):
|
| 2084 |
appended_instructions = (
|
|
|
|
| 2085 |
"Craft a flawless, engaging, and fluid compelling copy using *non-flowery language* that reads as though written by a professional copywriter having 25 years of experience. "
|
| 2086 |
+
"Do not use AI jargon, vague phrases, or formal language. Follow these enhanced guidelines to ensure a polished, publication-ready copy with a 10/10 quality: "
|
| 2087 |
"1. **Interconnected Structure**: Ensure all sections and ideas flow seamlessly with logical transitions between paragraphs. Build a cohesive narrative where every part supports the overall theme, reinforcing the message at every step. "
|
| 2088 |
"3. **Seamless Integration of TrustBuilders®**: Naturally incorporate TrustBuilders® into the narrative without isolating or explicitly listing them in the main body. Instead, weave them fluidly into sentences to build credibility and trust while maintaining the content’s readability and engagement. "
|
| 2089 |
"4. **Human Tone**: Write in a relatable, conversational tone that engages the reader and feels natural. Avoid repetitive phrasing, overly technical explanations, or mechanical structures. Use active voice consistently, ensuring the tone is both approachable and professional."
|
|
|
|
| 2091 |
"6. **Enhanced Audience Engagement**: Use storytelling techniques and mix the trustbuilders into a content. Begin with a compelling hook, maintain momentum through transitions, and conclude with a strong call-to-action that inspires the reader to act or reflect. "
|
| 2092 |
"7. **Purpose-Driven Impact**: Clearly define and achieve the content’s purpose—whether to inform, persuade, or inspire action. Ensure every paragraph serves the overall objective while reinforcing the key message. "
|
| 2093 |
"8. **Polished Presentation**: Ensure the final output is refined, professional, and suitable for publication. The copy should demonstrate mastery of language and content design, leaving no room for ambiguity or errors. "
|
| 2094 |
+
"dont give source link in content"
|
| 2095 |
+
"Dont mention trust bucket names literally"
|
| 2096 |
+
"1. ##List of TrustBuilders Used: Provide trust-building elements with Source links."
|
| 2097 |
+
" 2. ##Heuristics and Creative Techniques :"
|
| 2098 |
" -List them in a footnote-style small heading."
|
| 2099 |
" Use the following structure:"
|
| 2100 |
" -Heuristics: Mention names only like examples (e.g., social proof, authority, commitment)."
|
| 2101 |
" -Creative Techniques: Mention names onlyexamples (list only relevant marketing techniques without additional details)."
|
| 2102 |
+
"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."
|
| 2103 |
+
"MOST IMPORTANT RULE. EVERY PARAGRAPH 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."
|
| 2104 |
+
|
| 2105 |
+
)
|
| 2106 |
else:
|
| 2107 |
appended_instructions = ""
|
| 2108 |
final_prompt = f"{prompt} {base_instructions} {appended_instructions}"
|