Added different set of answered prompts

main
Pavan Mandava 3 years ago
parent a57ef238e8
commit 7fd36b9134

@ -0,0 +1,17 @@
user : i need to be picked up from city centre after 16:30.\n
belief states: city centre = departure, 16:30 = leave \n
user : i am looking for a table at rice house restaurant for a party of 8 at 11:15 on thursday.\n
belief states: rice house = name, thursday = day, 8 = people, 11.15 = time \n
user : i need a train from cambridge that can arrive by 16:15.\n
system : where is your destination? user : i want to go to broxbourne.\n
belief states: cambridge = departure, 16:15 = arrive, broxbourne = destination \n
user : hi, i need to leave from frankfurt airport. can you find me a train after 20:15?\n
belief states: frankfurt airport = departure, 20:15 = leave \n
user : i would like a restaurant in the south part of town that serves italian food.\n
belief states: italian = food, south = area \n
user : i'm looking for a 4-star place to stay on the west side that offers free wifi.\n
belief states: west = area, 4 = stars, yes = internet \n
user : can you please help me get information on cityroomz? i need to book it for 3 people and 2 nights starting tuesday.\n
belief states: cityroomz = name, tuesday = name, 3 = people, 2 = stay \n
user : i am looking for a museum in the town centre.\n
belief states: museum = type, centre = area \n

@ -0,0 +1,16 @@
user : hello, i'm looking for a 4 star place on the west side to stay at.\n
system : do you have a price range ?\n
user : yes, i am looking in the expensive price range. also, i need free parking.\n
belief states: west = area, 4 = stars, expensive = price, yes = parking \n
user : i am looking for a train, it should go to cambridge and should depart from norwich.\n
system : what time and day are you looking to travel?\n
user : yes, i would like travel on monday and i would need to arrive by 08:30. \n
belief states: cambridge = destination, norwich = departure, monday = day, 08:30 = arrive \n
user : i would like an expensive place to dine, centre of town.\n
system : what type of food would you like to eat?\n
user : the type of food doesn't matter, but i need a reservation for 8 people on wednesday at 12:45\n
belief states: expensive = price, centre = area, dont care = food, 8 = people, wednesday = day, 12:45 = time \n
user : i need a taxi to pick me up at curry prince at 08:15.\n
belief states: curry prince = departure, 08:15 = leave \n
user : i am looking for a place in the centre of town that is a nightclub.\n
belief states: night club = type, centre = area \n

@ -31,11 +31,16 @@ def generate_slot_from_prompt(args, history, value, tokenizer, model, device):
if args.with_prompt_ensemble:
return generate_slot_with_prompt_ensemble(args, history, value, tokenizer, model, device)
# append prompt demonstrations here
answered_prompts = ''
if args.with_answered_prompts:
answered_prompts = get_answered_prompts()
# get value-based prompt for generating slots
prompt = get_value_based_prompt(value)
# combine history and prompt
prompt = history + prompt
prompt = answered_prompts + history + prompt
# encode the history & prompt
encoded_prompt = tokenizer(prompt, return_tensors="pt")
encoded_prompt.to(device)

@ -37,7 +37,22 @@ PROMPT_TEMPLATES = {
# TODO add the final set of answered prompts
ANSWERED_PROMPTS = """
user : hello, i'm looking for a 4 star place on the west side to stay at.\n
system : do you have a price range ?\n
user : yes, i am looking in the expensive price range. also, i need free parking.\n
belief states: west = area, 4 = stars, expensive = price, yes = parking \n
user : i am looking for a train, it should go to cambridge and should depart from norwich.\n
system : what time and day are you looking to travel?\n
user : yes, i would like travel on monday and i would need to arrive by 08:30. \n
belief states: cambridge = destination, norwich = departure, monday = day, 08:30 = arrive \n
user : i would like an expensive place to dine, centre of town.\n
system : what type of food would you like to eat?\n
user : the type of food doesn't matter, but i need a reservation for 8 people on wednesday at 12:45\n
belief states: expensive = price, centre = area, dont care = food, 8 = people, wednesday = day, 12:45 = time \n
user : i need a taxi to pick me up at curry prince at 08:15.\n
belief states: curry prince = departure, 08:15 = leave \n
user : i am looking for a place in the centre of town that is a nightclub.\n
belief states: night club = type, centre = area \n
"""

Loading…
Cancel
Save