feat: paginate candidate model recommendations

This commit is contained in:
ar51
2026-09-01 09:48:01 +08:00
parent d97b788e0e
commit 8a695900f3
9 changed files with 598 additions and 52 deletions

View File

@@ -49,6 +49,16 @@ Stop if:
- An @mention by itself does not bypass this content gate.
- After a valid message passes the gate, API or runtime failures may still return
the bounded internal error response defined by this capability.
- Exception for candidate continuation: after a valid initial query, the same
sender in the same Feishu chat may use any clear equivalent continuation
expression without repeating the model and quantity. Examples include `还有吗`
`有没有别的``再推荐几个``继续``下一批` and `more candidates`; exact wording
is not required.
- A continuation uses only the active in-memory query context, expires after six
hours or a bridge restart, and is never shared across senders or chats. Without
matching active context, the message stays silent.
- A new complete model-and-quantity request replaces any earlier continuation
context for that sender and chat.
## Feishu File-Write Boundary
@@ -83,6 +93,26 @@ Do not use temporary curl, WebFetch, or any API method outside the controlled sc
- If AM516 fields are absent, use original API prediction and mark it as original algorithm reference.
- If only total days are available, state the total days and ask for human review.
## Candidate Batch Rule
- Generate and preserve the complete ordered rule-candidate pool, but query and
recommend at most four candidate models per reply.
- The original input model is queried as the initial baseline and does not count
toward the four recommended candidate models.
- The initial reply queries the baseline plus candidate positions 1-4. If more
candidates remain, state the remaining count and invite the human to ask for
more in natural language; do not require one fixed command phrase.
- Recognize short or synonymous continuation expressions only together with the
valid same-sender, same-chat continuation context. Unrelated topic text such as
`more interesting` or `继续查询英语例句` must not reuse the old delivery query.
- Each valid continuation queries the next four unqueried candidates in the same
rule order. Do not query or display an earlier candidate again, and do not
re-query the original baseline.
- Continue in batches of four until the full candidate pool is exhausted. The
final batch explicitly states that all rule candidates have been queried.
- Missing or unsupported models count as queried positions and remain summarized
under `不可用候选`; do not silently skip them to pull later candidates forward.
## Reducer Shortage Detail Rule
- Treat a shortage item as a reducer only when `data.采购信息.缺料明细[].缺料物料` starts with `20.30.`.
@@ -105,6 +135,7 @@ Include:
- title and generation time;
- input model and quantity;
- overall judgment;
- current candidate batch and remaining-candidate count;
- candidate details;
- main factor;
- API exception if any;
@@ -120,6 +151,7 @@ Use this field order for a successful Feishu report:
数据时间戳:{API data timestamp or generation time}
状态:试运行版输出 / 内部候选
判断等级AM516算法预测参考需人工复核
候选范围本次先推荐4个候选型号原型号另作基准尚有N个规则候选未查询
总体判断:
- 现货候选:{fully covered candidate or none}
@@ -148,12 +180,13 @@ Use Feishu rich-text `post` output. Bold only:
- the report title;
- `总体判断:`;
- `本批次判断:` for a continuation reply;
- each numbered candidate heading;
- `不可用候选:`.
Do not repeat a separate human-review line under each candidate. The global judgment level and fixed disclaimer carry the human-review boundary.
If the full candidate report exceeds the Feishu rich-text size limit, split it into multiple ordered `post` replies without dropping any queried candidate. Use the original report title on the first part and append `(续)` to continuation titles.
If the current candidate-batch report exceeds the Feishu rich-text size limit, split it into multiple ordered `post` replies without dropping any candidate queried in that batch. Use the original report title on the first part and append `(续)` to continuation titles.
## Fixed Disclaimer