Retrieve Kb Answer

Search the project KB and return either a direct answer with citations or "no high-confidence match".

jcaiagent7143-ui Updated

File contents

Retrieve KB Answer

Steps

  1. Run vector + keyword hybrid search over the project KB (likely under docs/, kb/, or the README + CONTRIBUTING).
  2. Compute reranker confidence. If ≥ confidence_threshold, draft a reply that cites every claim by source filename + section anchor.
  3. If below threshold, return {reply: null, reason: "low_confidence", topics: [...]} so the next step files a ticket instead.
  4. Never guess: if the KB doesn't cover it, that's a ticket, not a wing-it.

Output shape

{
  "reply": "...",                          // or null
  "citations": [{"source": "docs/x.md#hdr", "snippet": "..."}],
  "confidence": 0.84,
  "reason": null                            // or "low_confidence"
}

Failure modes

  • Citing a doc you didn't actually retrieve.
  • Suppressing low confidence so the answer ships unticketed (looks productive; produces angry follow-ups).
  • Replying with the user's question rephrased — say nothing rather than hallucinating an answer.

jcaiagent7143-ui/harnessforge/tree/main/src/harness/blueprints/support-agent/skills/retrieve-kb-answer commit e492e2dbec

Frequently asked questions

npx skillmds@latest add jcaiagent7143-ui/retrieve-kb-answer