Registry Mirror
Skip to content

Conversation

@anurag629

Copy link
Copy Markdown
Member

Part of P3 (O1): an answer rate is one of the cloud beta's exit checks, and the dashboard lists questions the knowledge doesn't cover. This is F-11's unanswered detector in its minimal form: the free signals only, no judge.

  • checkAnswered({ reply, retrieval?, cited?, phrases? }) in @chatcops/core returns { answered, reason? }. A reply isn't answered when:
    • refusal: it says it doesn't know near its start. The phrases cover English, Spanish, French, German and Portuguese, and are only checked in the first 300 characters, so a hedge late in a real answer doesn't count.
    • no_retrieval: a retrieving knowledge source ran and found nothing, or its top score is under an optional minScore.
    • no_citation: retrieval found pages, but a reply longer than 20 words cited none of them.
  • The server saves the verdict on every finished reply with text, as metadata.answered and metadata.unansweredReason. Nothing goes on the wire, and the stream doesn't change.
  • core/analytics.mdx has a short "Whether a reply answered" section.

How I tested this

  • tests/analytics/unanswered.test.ts: 14 cases. Each language's refusal phrases, the start-only window, custom phrases, no chunks, minScore, uncited long replies, and short and cited replies that pass.
  • tests/handler-answered.test.ts: what's saved for a cited reply, an uncited long reply, empty retrieval, a refusal, and a plain reply.
  • pnpm -r build, typecheck, lint (38), docs:check, api (snapshot updated) and coverage for core and server pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant