tmskss commited on
Commit
245d66c
1 Parent(s): 22b1013

Extend examples for classifier

Browse files
Files changed (1) hide show
  1. app.py +14 -5
app.py CHANGED
@@ -226,11 +226,20 @@ def text_to_text_generation(verbose, prompt):
226
 
227
  is_kubectl_prompt = (
228
  f"You are a helpful assistant who classifies prompts into three categories. [INST] Respond with 0 if it pertains to a 'kubectl' operation. This is an instruction that can be answered with a 'kubectl' action. Look for keywords like 'get', 'list', 'create', 'show', 'view', and other command-like words. This category is an instruction instead of a question. Respond with 1 only if the prompt is a question, and is about a definition related to Kubernetes, or non-action inquiries. Respond with 2 every other scenario, for example if the question is a general question, not related to Kubernetes or 'kubectl'.\n"
229
- f"So for instance the following:\n"
230
- f'text: "List all pods in Kubernetes"\n'
231
- f"Would get a response:\n"
232
- f"response (0/1/2): 0 [/INST] \n"
233
- f'text: "{prompt}"'
 
 
 
 
 
 
 
 
 
234
  f"response (0/1/2): "
235
  )
236
 
 
226
 
227
  is_kubectl_prompt = (
228
  f"You are a helpful assistant who classifies prompts into three categories. [INST] Respond with 0 if it pertains to a 'kubectl' operation. This is an instruction that can be answered with a 'kubectl' action. Look for keywords like 'get', 'list', 'create', 'show', 'view', and other command-like words. This category is an instruction instead of a question. Respond with 1 only if the prompt is a question, and is about a definition related to Kubernetes, or non-action inquiries. Respond with 2 every other scenario, for example if the question is a general question, not related to Kubernetes or 'kubectl'.\n"
229
+ f"Here are some examples:\n"
230
+ f"text: List all pods in Kubernetes\n"
231
+ f"response (0/1/2): 0 \n"
232
+ f"text: What is a headless service and how to create one?\n"
233
+ f"response (0/1/2): 1 \n"
234
+ f"text: What is the capital of Hungary?\n"
235
+ f"response (0/1/2): 2 \n"
236
+ f"text: Display detailed information about the pod 'web-app-pod-1'\n"
237
+ f"response (0/1/2): 0 \n"
238
+ f"text: What are some typical foods in Germany?\n"
239
+ f"response (0/1/2): 2 \n"
240
+ f"text: What is a LoadBalancer in Kubernetes?\n"
241
+ f"response (0/1/2): 1 \n"
242
+ f'Classify the following: [/INST] \ntext: "{prompt}\n"'
243
  f"response (0/1/2): "
244
  )
245