Skip to content

Commit

Permalink
temp fix for long id
Browse files Browse the repository at this point in the history
  • Loading branch information
semio committed Jan 15, 2025
1 parent 0afcccb commit 4aa7315
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion automation-api/lib/pilot/generate_eval_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,12 @@ def generate_eval_prompts(
option_c_correctness=question_row["option_c_correctness"],
)

custom_id = f"{prompt_id}-eval-{metric_id}"
# FIXME: anthropic expect custom id less than 64 chars.
# We should just update the generate_prompt.py to use shorter
# custom_id and no need to do it here.
custom_id = f"{prompt_id}-{metric_id}".replace("-question-", "-q-")
if len(custom_id) > 64:
raise ValueError("custom_id too long")
prompt_id_mapping.append((custom_id, eval_prompt))

if format == JsonlFormat.OPENAI:
Expand Down

0 comments on commit 4aa7315

Please sign in to comment.