From 8ba6fcfa2686bd3e73708601e8520390fbef9824 Mon Sep 17 00:00:00 2001 From: Sasha Vezhnevets Date: Thu, 7 Dec 2023 09:13:53 -0800 Subject: [PATCH] a refined prompt for multiple choice. PiperOrigin-RevId: 588814004 Change-Id: I51b51a84e738c563ca1cad0d1f9b27a88b6fa728 --- concordia/language_model/gpt_model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/concordia/language_model/gpt_model.py b/concordia/language_model/gpt_model.py index 12815391..784756f7 100644 --- a/concordia/language_model/gpt_model.py +++ b/concordia/language_model/gpt_model.py @@ -95,10 +95,10 @@ def sample_choice( attempts = 1 prompt = ( prompt - + '\nRespond with one of the following responses: ' - + ' ,'.join(responses) - + '.' + + '\nRespond EXACTLY with one of the following strings:\n' + + '\n'.join(responses) + '.' ) + for _ in range(_MAX_MULTIPLE_CHOICE_ATTEMPTS): sample = self.sample_text( prompt,