feat: 优化
This commit is contained in:
parent
b0ea883d2d
commit
430141b550
@ -101,7 +101,7 @@ async def select_best_qa(qa_group: list) -> str:
|
||||
3. **信息密度**:单位字数内有效信息更多,无冗余废话
|
||||
4. **实用性**:对用户实际解决问题的帮助程度
|
||||
{qa_text}
|
||||
请直接输出最完整结果。格式:{"question": "xxxxx", "answer": "bbbb"}
|
||||
请直接输出最完整结果。格式:{{"question": "xxxxx", "answer": "bbbb"}}
|
||||
"""
|
||||
|
||||
prompt = PromptTemplate(template=prompt, input_variables=["qa_text"])
|
||||
|
||||
@ -65,8 +65,8 @@ if __name__ == '__main__':
|
||||
await embedding_client.close()
|
||||
|
||||
|
||||
start = datetime(2026, 5, 29)
|
||||
end = datetime(2026, 6, 16)
|
||||
start = datetime(2026, 6, 23)
|
||||
end = datetime(2026, 6, 25)
|
||||
|
||||
result = []
|
||||
temp = start
|
||||
|
||||
@ -25,4 +25,4 @@ class QualityScore:
|
||||
self.clarity
|
||||
]
|
||||
valid_scores = [s if s is not None else 0 for s in scores]
|
||||
return sum(s * w for s, w in zip(valid_scores, weights)) * 10 # 转换为百分制
|
||||
return sum(float(s) * w for s, w in zip(valid_scores, weights)) * 10 # 转换为百分制
|
||||
Loading…
Reference in New Issue
Block a user