Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -279,51 +279,35 @@ def google_search_tool(query: str):
|
|
| 279 |
tools = [knowledge_base_tool, google_search_tool]
|
| 280 |
|
| 281 |
# Create the prompt template
|
| 282 |
-
prompt_message = f"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
|
| 284 |
-
Classification:
|
| 285 |
-
General Query: If the user asks for general information (e.g., blogs, posts, articles, reports etc)
|
| 286 |
-
Trust-Based Query: If the user seeks proof points or compelling content related to particular trust bucket , classify it under a trust
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
*
|
| 290 |
-
*
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
*Sub-points : Strictly add sub-points in this case only
|
| 302 |
-
*Facts and figures : Strictly be Specific with names, dates, locations, numbers, Dollars , currency , figures etc. in proof points .
|
| 303 |
-
*Active Tonality: Write in an active, dynamic, and enthusiastic tone.
|
| 304 |
-
*Source URL : With every point of information generated by you , always return correct source URL of that information in bracket with that particular point.
|
| 305 |
-
|
| 306 |
-
**Heuristics and Creative Techniques:**
|
| 307 |
-
|
| 308 |
-
When generating responses, incorporate the following heuristics and creative techniques as appropriate to enhance the quality and impact of the copy:
|
| 309 |
-
|
| 310 |
-
Storytelling: Weave narratives or anecdotes to illustrate key points and engage the reader emotionally.
|
| 311 |
-
Problem-Agitation-Solution: Present a problem, emphasize its impact, then offer a solution.
|
| 312 |
-
Metaphors and Analogies: Use comparisons to explain complex concepts in relatable terms.
|
| 313 |
-
Social Proof: Incorporate testimonials, case studies, or statistics to build credibility.
|
| 314 |
-
Scarcity and Urgency: Create a sense of limited availability or time pressure when appropriate.
|
| 315 |
-
Benefit-Focused Language: Emphasize "what's in it for the reader" rather than just features.
|
| 316 |
-
Sensory Language: Use vivid, descriptive words that appeal to the five senses.
|
| 317 |
-
Pattern Interrupts: Use unexpected elements or formatting to maintain reader interest.
|
| 318 |
-
Future Pacing: Help readers envision positive future outcomes.
|
| 319 |
-
Repetition with Variation: Reinforce key messages using different phrasings or contexts.
|
| 320 |
-
Rhetorical Questions: Engage readers by prompting them to think actively about the topic.
|
| 321 |
-
Power Words: Incorporate emotionally charged words to evoke specific feelings or reactions.
|
| 322 |
-
Before-After-Bridge: Describe the current situation, the desired outcome, and how to get there.
|
| 323 |
-
Bucket Brigades: Use short phrases or questions to maintain momentum and encourage continued reading.
|
| 324 |
-
AIDA Framework: Structure content to grab Attention, generate Interest, create Desire, and prompt Action.
|
| 325 |
-
[Always consider which of these techniques would be most appropriate and effective for the specific query and context when crafting your response]
|
| 326 |
-
"""
|
| 327 |
|
| 328 |
|
| 329 |
prompt_template = ChatPromptTemplate.from_messages([
|
|
|
|
| 279 |
tools = [knowledge_base_tool, google_search_tool]
|
| 280 |
|
| 281 |
# Create the prompt template
|
| 282 |
+
prompt_message = f"""
|
| 283 |
+
**ROLE:** Act as expert content writer .
|
| 284 |
+
|
| 285 |
+
**TASK:** Generate meaningful content for user based upon user query: [{message}] .
|
| 286 |
+
|
| 287 |
+
|
| 288 |
+
**TONE:** Write in an active and enthusiastic tone.
|
| 289 |
+
**Restrictions:** Strictly do not mention "Conclusion" in your response .
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
First classify this query : " [message]" as general or trust based query for your convenience. Do not explicity mention in response .
|
| 293 |
|
| 294 |
+
**Classification Criteria :**
|
| 295 |
+
General Query: If the user asks for general information (e.g., blogs, posts, articles, reports etc) for any organization , classify it as a general query.
|
| 296 |
+
Trust-Based Query: If the user seeks proof points or compelling content related to particular trust bucket , classify it under a trust based query.
|
| 297 |
+
If query is general :
|
| 298 |
+
* For general queries, you need to generate a meaningful response.
|
| 299 |
+
* It should properly follow format of blogs , reports and articles for any organization. No need to literally follow the knowledge base here .
|
| 300 |
+
* Do not mention name of trust bucket [ stability, development , relationship , competence , benefit , vision] in your response .
|
| 301 |
+
If query is related to trust builders or proof points , refer to knowledge base :[{knowledge_base}] and follow the instructions :
|
| 302 |
+
* Generate a compelling copy between 1000-2000 words based upon guidlines & objective of specific trust bucket mentioned in [message].
|
| 303 |
+
* Strictly Do not mention "Trust" , "Stability" , "Development" , "Relationship" , "Competence" , "benefit" , "vision" words in your response .
|
| 304 |
+
* If [message] contains more than one trust bucket then Do not make seperate sections/headings for both the buckets .
|
| 305 |
+
* Proof Points: Use guiding principles or objectives from the knowledge base to support your points . Add sub-points everytime
|
| 306 |
+
* Strictly be specific with names, dates, locations, numbers, Dollars , currency , figures etc. in proof points .Proof points should contain as much amount figures,dollars as possible .
|
| 307 |
+
* With every proof point , always return correct source link of that information in bracket with every point.
|
| 308 |
+
* Trust Statements/TrustBuilders: Use these terms interchangeably in place of "proof points" throughout your response. Do not overuse one term."""
|
| 309 |
+
|
| 310 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 311 |
|
| 312 |
|
| 313 |
prompt_template = ChatPromptTemplate.from_messages([
|