DrishtiSharma commited on
Commit
c0aa263
·
verified ·
1 Parent(s): c298eab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -192,10 +192,14 @@ if query:
192
 
193
  QUERY:
194
  {retriever_query}
195
- Provide your verdict in JSON format with a single key 'score' and no preamble or explanation:
196
- [{{"content:1,"score": <your score either 0 or 1>,"Reasoning":<why you have chose the score as 0 or 1>}},
197
- {{"content:2,"score": <your score either 0 or 1>,"Reasoning":<why you have chose the score as 0 or 1>}},
198
- ...]
 
 
 
 
199
  """
200
 
201
  context_relevancy_checker_prompt = PromptTemplate(input_variables=["retriever_query","context"],template=relevancy_prompt)
 
192
 
193
  QUERY:
194
  {retriever_query}
195
+ You MUST respond in valid JSON format only.
196
+ DO NOT add any explanations, thoughts, or text outside the JSON.
197
+ ### **Example JSON Format**
198
+ ```json
199
+ [
200
+ {"content": 1, "score": 0, "reasoning": "The content is relevant."},
201
+ {"content": 2, "score": 1, "reasoning": "The content is irrelevant."}
202
+ ]
203
  """
204
 
205
  context_relevancy_checker_prompt = PromptTemplate(input_variables=["retriever_query","context"],template=relevancy_prompt)