Skip to content

Commit

Permalink
a refined prompt for multiple choice.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 588814004
Change-Id: I51b51a84e738c563ca1cad0d1f9b27a88b6fa728
  • Loading branch information
vezhnick authored and copybara-github committed Dec 7, 2023
1 parent fd46a10 commit 8ba6fcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions concordia/language_model/gpt_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8ba6fcf

Please sign in to comment.