摘要措辞统一(笔记→概括):修复重试提示词/两条异常消息;等 UNPARSABLE 原始输出行定性P1失败(白卷 or 格式)
This commit is contained in:
parent
98a3098172
commit
caee985dcc
|
|
@ -409,8 +409,8 @@ class SummarizePipeline(
|
|||
"上一次输出不是合法JSON: " +
|
||||
out.take(200).replace("\n", " ") + "。"
|
||||
val fix = user + "\n\n(" + why +
|
||||
"请从【新的断片】中至少提取一条并合并,只输出修正后的笔记JSON," +
|
||||
"禁止照抄输入笔记。)"
|
||||
"请把【新的断片】的内容合并进概括,只输出修正后的JSON," +
|
||||
"禁止照抄输入概括。)"
|
||||
out = engine.generate(
|
||||
systemPrompt = prompts.p1System, userPrompt = fix,
|
||||
maxNewTokens = 900, temperature = 0f,
|
||||
|
|
@ -427,7 +427,7 @@ class SummarizePipeline(
|
|||
"tail=[" + out.takeLast(60).replace("\n", "\\n") + "]")
|
||||
// 及时止损:第一块都解析不出来,笔记链条已断,后面块只会白烧 token
|
||||
if (idx == 0) {
|
||||
throw SummarizeEmptyException("开头转写片段无法生成有效笔记(内容过少或输出不可解析)")
|
||||
throw SummarizeEmptyException("开头转写片段无法生成有效概括(内容过少或输出不可解析)")
|
||||
}
|
||||
}
|
||||
// 测量点(baseline,不改行为):raw≫json 说明解码浪费在废话/思考上;
|
||||
|
|
@ -441,7 +441,7 @@ class SummarizePipeline(
|
|||
"chunks=$total failed=$failed")
|
||||
// 空笔记终检:全部块失败,或笔记仍是空壳(total==0 已在入口取消)
|
||||
if (failed == total || notesEntriesEmpty(notes)) {
|
||||
throw SummarizeEmptyException("整场转写未能形成任何笔记条目" +
|
||||
throw SummarizeEmptyException("整场转写未能形成有效概括" +
|
||||
"(failed=$failed/$total, notes=" +
|
||||
notes.replace("\n", " ").take(120) + ")")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue