feat:提示词约束2以及bug修复

This commit is contained in:
雷雨
2025-10-24 11:06:53 +08:00
parent dff9b9a092
commit 039b15341e
3 changed files with 897 additions and 799 deletions

View File

@@ -84,6 +84,7 @@ template:
WITH "name"||"shortname" LIKE '%xx中心%' AND "dr"=0 AND "enable"=1 AND "code" LIKE '%CYJ%'
CONNECT BY PRIOR "id" = "parentid"
</rule-detail>
<rule-detail>当用户问题涉及查询是否时候。结果需要返回:是/否。而不是返回查询记录</rule-detail>
</rule>
<rule>
<rule-title>关联与限制</rule-title>

View File

@@ -28,9 +28,10 @@ def add_documentation(vn: CustomVanna):
random.shuffle(dd)
# for d in dd:
# vn.add_question_sql(question=d['question'], sql=d['answer'])
for d in q_and_a_test1.question_and_answer:
## tag 待定,容易过拟合
for d in dd:
vn.add_question_sql(
question=f"{d['question']} [分类:{d['category']}] [标签:{','.join(d['tags'])}]",
question=f"{d['question']}",
sql=d['answer']
)

File diff suppressed because it is too large Load Diff