修复枚举对应错误,增加问答示例,优化提示词,优化问答示例结构增强检索效果
This commit is contained in:
@@ -23,17 +23,15 @@ def add_documentation(vn: CustomVanna):
|
||||
for doc in list_documentions:
|
||||
vn.add_documentation(doc)
|
||||
dd=[]
|
||||
dd.extend(q_and_a_dict.question_and_answer)
|
||||
##dd.extend(q_a_next.org_and_attend_q_a)
|
||||
dd.extend(q_and_a_test1.question_and_answer)
|
||||
dd.extend(q_a_next.org_and_attend_q_a)
|
||||
random.shuffle(dd)
|
||||
for d in dd:
|
||||
vn.add_question_sql(question=d['question'], sql=d['answer'])
|
||||
|
||||
# for d in dd:
|
||||
# vn.add_question_sql(question=d['question'], sql=d['answer'])
|
||||
for d in q_and_a_test1.question_and_answer:
|
||||
vn.add_question_sql(
|
||||
question=f"{d['question']} [分类:{d['category']}] [标签:{','.join(d['tags'])}]",
|
||||
sql=d['answer']
|
||||
)
|
||||
# vn.add_question_sql(question=d['question'], sql=d['answer'])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user