(train_df, k=-1)
| 61 | # 生成 prompt |
| 62 | # 不提示专业科目,让模型直接理解题目 |
| 63 | def gen_prompt(train_df, k=-1): |
| 64 | prompt = "请阅读以下选择题并给出正确选项,不要解释原因。请只给出答案的序号。\n" |
| 65 | if k == -1: |
| 66 | k = train_df.shape[0] |
| 67 | for i in range(k): |
| 68 | prompt += format_example(train_df, i) |
| 69 | |
| 70 | return prompt |
| 71 | |
| 72 | # bloomz |
| 73 | def plain_chat( |
no test coverage detected