Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -159,14 +159,20 @@ def initialize_llmchain(llm_model, temperature, max_tokens, top_k, vector_db, pr
|
|
159 |
|
160 |
|
161 |
|
162 |
-
template = """Your task is as follows:
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
PROMPT = PromptTemplate(
|
169 |
-
input_variables=["question","context"
|
170 |
template=template
|
171 |
)
|
172 |
|
|
|
159 |
|
160 |
|
161 |
|
162 |
+
template = """Your task is as follows:
|
163 |
+
1. Determine if the input {question} is compliant with the provided {context}.
|
164 |
+
2. If the {question} is compliant, report "This requirement is compliant."
|
165 |
+
3. If the {question} is not compliant report "This requirement is not compliant."
|
166 |
+
4. If the {question} is not compliant, give the reason for non compliance and return the specific rule or guideline the requirement violates from the {context}.
|
167 |
+
5. If the {question} is not compliant, report a refined version of the {question} that is compliant with the provided {context}.
|
168 |
+
"""
|
169 |
+
#Context: {context}
|
170 |
+
#Chat History: {chat_history}
|
171 |
+
#Input: {question}
|
172 |
+
#"""#Standalone question:"""
|
173 |
|
174 |
PROMPT = PromptTemplate(
|
175 |
+
input_variables=["question","context"]#, "chat_history"],#, "question"],
|
176 |
template=template
|
177 |
)
|
178 |
|