research14 commited on
Commit
c08b383
1 Parent(s): fad6b55

updated strategy 3 prompt

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -103,14 +103,18 @@ def gpt_strategies_respond(have_key, strategy, task_name, task_ling_ent, message
103
  elif (strategy == "S2"):
104
  formatted_system_prompt = f'''POS tag the following sentence using Universal POS tag set: "{message}"'''
105
  elif (strategy == "S3"):
106
- formatted_system_prompt = f'''POS tag the following sentence using Universal POS tag set: "{message}"'''
 
 
107
  elif (task_name == "Chunking"):
108
  if (strategy == "S1"):
109
  formatted_system_prompt = f'''Generate the output only for the assistant. Output any {task_ling_ent} in the following sentence one per line: "{message}"'''
110
  elif (strategy == "S2"):
111
  formatted_system_prompt = f'''Chunk the following sentence in CoNLL 2000 format with BIO tags: "{message}"'''
112
  elif (strategy == "S3"):
113
- formatted_system_prompt = f'''Chunk the following sentence in CoNLL 2000 format with BIO tags: "{message}"'''
 
 
114
 
115
  formatted_prompt = format_chat_prompt(message, chat_history, max_convo_length)
116
  print('Prompt + Context:')
 
103
  elif (strategy == "S2"):
104
  formatted_system_prompt = f'''POS tag the following sentence using Universal POS tag set: "{message}"'''
105
  elif (strategy == "S3"):
106
+ with open('demonstration_3_42_pos.txt', 'r') as f:
107
+ demon_pos = f.read()
108
+ formatted_system_prompt = f'''"{demon_pos}". Using the POS tag structure above, POS tag the following sentence: "{message}"'''
109
  elif (task_name == "Chunking"):
110
  if (strategy == "S1"):
111
  formatted_system_prompt = f'''Generate the output only for the assistant. Output any {task_ling_ent} in the following sentence one per line: "{message}"'''
112
  elif (strategy == "S2"):
113
  formatted_system_prompt = f'''Chunk the following sentence in CoNLL 2000 format with BIO tags: "{message}"'''
114
  elif (strategy == "S3"):
115
+ with open('demonstration_3_42_chunk.txt', 'r') as f:
116
+ demon_chunk = f.read()
117
+ formatted_system_prompt = f'''"{demon_chunk}". Using the POS tag structure above, POS tag the following sentence: "{message}"'''
118
 
119
  formatted_prompt = format_chat_prompt(message, chat_history, max_convo_length)
120
  print('Prompt + Context:')