generate_answer (MCP) should decline confidently answering bug-shaped questions

Aperta
#18 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
ai, backend

Direzione di ricerca

Start by reading generateAnswerCore in lib/agent/core.ts to see the current generateText, assessAnswer and shouldAutoDeflect flow, then find triageMessage and the category branch that the ticket-category routing issue adds to the ticket pipeline. This issue is deliberately deferred until that ticket-side change lands, so confirm it exists before starting, and get sign-off on the extra classifier call per metered generate_answer invocation. Done means generate_answer returns an explicit bug-report/feature-request decline instead of a confident KB answer, covered by a test around the new branch.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

backend enhancement question

Copied from DeadantCo/answerLoops#8 · originally opened by sethr07 on 2026-11-20

Copied from https://github.com/answerLoops/answerLoops/issues/12 — originally opened by @NathanTarbert on 2026-07-28

Context

Follow-up scope question from the ticket-category routing issue (answer pipeline should route on ticket category rather than treating every ticket as answerable). That issue covers the ticket-based ingest pipeline (Discord/Slack/GitHub/Telegram/Email/create_ticket) — this issue covers the other MCP tool, generate_answer, which is a separate code path entirely.

The gap

generateAnswerCore (lib/agent/core.ts) takes a raw question string with no ticket and no triage/category step at all. It goes straight to generateText + KB context, then assessAnswer/shouldAutoDeflect. There's no signal today telling it "this looks like a bug report, don't confidently answer it."

Proposed fix

Add a triageMessage(question, orgId) call inside generateAnswerCore before generating, and apply the same category branch that issue adds to the ticket pipeline: for bug/feature_request-shaped questions, don't generate a confident KB answer — return an explicit "this sounds like a bug report / feature request, not something I can answer from documentation" response instead.

Cost tradeoff

This adds one classifier call (fast/cheap model, same one used for ticket triage) to every generate_answer invocation. Worth confirming that's an acceptable cost increase before implementing, since generate_answer is billed/metered per call.

Scope

Deferred out of the ticket-category routing issue on purpose — that issue is scoped to the ticket pipeline only. Do this as its own PR once the ticket-pipeline version has landed and the category-branch logic is proven out.

Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.

Lingua principale
TypeScript
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DeadantCo/answerLoopsdev

Tutte le issue di DeadantCo/answerLoopsdev

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.