Skip to content

Commit

Permalink
updated gen_prompt to include reflections
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv committed Jun 24, 2024
1 parent fb3d945 commit 44c5a23
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions utils/gen_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ def generate_prompt(
if glossary == "":
glossary = dbs[db_name]["glossary"]

instruction_reflections = instructions.replace(
"\nFollow the instructions below to generate the query:",
"\nAdditionally, I was asked to follow the instructions below to generate the query:",
)
instruction_reflections = instruction_reflections + "\n"

prompt = prompt.format(
user_question=question,
db_type=db_type,
Expand All @@ -227,6 +233,7 @@ def generate_prompt(
question_1=question_1,
query_1=query_1,
cot_instructions=cot_instructions,
instruction_reflections=instruction_reflections,
)

if cot_pregen:
Expand Down

0 comments on commit 44c5a23

Please sign in to comment.