Update prompts.py
Browse files- prompts.py +31 -3
prompts.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
|
2 |
-
|
3 |
# RAG prompt
|
4 |
rag_prompt = """ You are ahelpful assistant very profiient in formulating clear and meaningful answers from the context provided.Based on the CONTEXT Provided ,Please formulate
|
5 |
a clear concise and meaningful answer for the QUERY asked.Please refrain from making up your own answer in case the COTEXT
|
@@ -54,4 +52,34 @@ Provide your verdict in JSON format with a single key 'score' and no preamble o
|
|
54 |
|
55 |
"""
|
56 |
|
57 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# RAG prompt
|
2 |
rag_prompt = """ You are ahelpful assistant very profiient in formulating clear and meaningful answers from the context provided.Based on the CONTEXT Provided ,Please formulate
|
3 |
a clear concise and meaningful answer for the QUERY asked.Please refrain from making up your own answer in case the COTEXT
|
|
|
52 |
|
53 |
"""
|
54 |
|
55 |
+
# Relevant Context Picker Prompt
|
56 |
+
relevant_context_picker_prompt = """You main task is to analyze the json structure as a part of the Relevancy Response.
|
57 |
+
Review the Relevancy Response and do the following:-
|
58 |
+
(1) Look at the Json Structure content
|
59 |
+
(2) Analyze the 'score' key in the Json Structure content.
|
60 |
+
(3) pick the value of 'content' key against those 'score' key value which has 0.
|
61 |
+
.
|
62 |
+
|
63 |
+
Relevancy Response:
|
64 |
+
{relevancy_response}
|
65 |
+
|
66 |
+
Provide your verdict in JSON format with a single key 'content number' and no preamble or explanation: [{{"content":<content number>}}]"""
|
67 |
+
|
68 |
+
## Prompt for MeaningFul Context for Response synthesis
|
69 |
+
response_synth = """ You main task is to analyze the json structure as a part of the Context Number Response and the list of Contexts provided in the 'Content List' and perform the following steps:-
|
70 |
+
(1) Look at the output from the Relevant Context Picker Agent.
|
71 |
+
(2) Analyze the 'content' key in the Json Structure format({{"content":<<content_number>>}}).
|
72 |
+
(3) Retrieve the value of 'content' key and pick up the context corresponding to that element from the Content List provided.
|
73 |
+
(4) Pass the retrieved context for each corresponing element number referred in the 'Context Number Response'
|
74 |
+
|
75 |
+
Context Number Response:
|
76 |
+
{context_number}
|
77 |
+
|
78 |
+
Content List:
|
79 |
+
{context}
|
80 |
+
|
81 |
+
Provide your verdict in JSON format with a two key 'relevant_content' and 'context_number' no preamble or explanation:
|
82 |
+
[{{"context_number":<content1>,"relevant_content":<content corresponing to that element 1 in the Content List>}},
|
83 |
+
{{"context_number":<content4>,"relevant_content":<content corresponing to that element 4 in the Content List>}},
|
84 |
+
...
|
85 |
+
]"""
|