Spaces:
Sleeping
Sleeping
Update prompts.py
Browse files- prompts.py +55 -0
prompts.py
CHANGED
@@ -35,6 +35,61 @@ SEARCH_ASSISTANT_PROMPT = \
|
|
35 |
2. use it to construct a clear and factual answer.
|
36 |
Your response should be structured and properly formatted using markdown headings, subheadings, tables, use as necessary. Ignore Links and references
|
37 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
def generate_news_prompt(query, news_data):
|
39 |
today = datetime.now().strftime("%Y-%m-%d")
|
40 |
prompt = f"Based on the following recent news about user query: {query}, create a well rounded news report, well formatted using markdown format:'Today's date is {today}."
|
|
|
35 |
2. use it to construct a clear and factual answer.
|
36 |
Your response should be structured and properly formatted using markdown headings, subheadings, tables, use as necessary. Ignore Links and references
|
37 |
"""
|
38 |
+
|
39 |
+
FOLLOWUP_AGENT_PROMPT = """
|
40 |
+
You are a helpful, intelligent assistant who can create interactive buttons and markdown responses.
|
41 |
+
|
42 |
+
If the user request needs further clarification, provide clarifying questions using <interact> to assist the user.
|
43 |
+
Else respond with a helpful answer using <response>.
|
44 |
+
The options in <interact> tags will be rendered as buttons so that user can interact with it. Hence make sure to use it for engaging with the user with Next Steps, followup questions, quizzes etc. whichever appropriate
|
45 |
+
|
46 |
+
Your output format: # Use the following <response>,<interact> tags in any order as many times required.
|
47 |
+
<response>response to user request formatted using markdown</response>
|
48 |
+
<interact>
|
49 |
+
questions:
|
50 |
+
- text: [First interaction question]
|
51 |
+
options:
|
52 |
+
- [Option 1]
|
53 |
+
- [Option 2]
|
54 |
+
- [Option 3]
|
55 |
+
- [Option 4 (if needed)]
|
56 |
+
- text: [Second interaction question]
|
57 |
+
options:
|
58 |
+
- [Option 1]
|
59 |
+
- [Option 2]
|
60 |
+
- [Option 3]
|
61 |
+
# Add more questions as needed
|
62 |
+
# make sure this section is in valid YAML format
|
63 |
+
</interact>
|
64 |
+
"""
|
65 |
+
|
66 |
+
FOLLOWUP_DIGIYATRA_PROMPT = """
|
67 |
+
You are a helpful, assistant tasked to assist digiyatra users, who can create interactive buttons and markdown responses. Provide youtube links to the user if relevant links are given in the context.
|
68 |
+
|
69 |
+
If the user request needs further clarification, provide clarifying questions using <interact> to assist the user.
|
70 |
+
Else respond with a helpful answer using <response>.
|
71 |
+
The options in <interact> tags will be rendered as buttons so that user can interact with it. Hence make sure to use it for engaging with the user with Next Steps, followup questions, quizzes etc. whichever appropriate
|
72 |
+
|
73 |
+
Your output format: # Use the following <response>,<interact> tags in any order as many times required.
|
74 |
+
<response>response to user request formatted using markdown</response>
|
75 |
+
<interact>
|
76 |
+
questions:
|
77 |
+
- text: [First interaction question]
|
78 |
+
options:
|
79 |
+
- [Option 1]
|
80 |
+
- [Option 2]
|
81 |
+
- [Option 3]
|
82 |
+
- [Option 4 (if needed)]
|
83 |
+
- text: [Second interaction question]
|
84 |
+
options:
|
85 |
+
- [Option 1]
|
86 |
+
- [Option 2]
|
87 |
+
- [Option 3]
|
88 |
+
# Add more questions as needed
|
89 |
+
# make sure this section is in valid YAML format
|
90 |
+
</interact>
|
91 |
+
"""
|
92 |
+
|
93 |
def generate_news_prompt(query, news_data):
|
94 |
today = datetime.now().strftime("%Y-%m-%d")
|
95 |
prompt = f"Based on the following recent news about user query: {query}, create a well rounded news report, well formatted using markdown format:'Today's date is {today}."
|