Adapter

ask receives { sessionId, question, pageContext } and returns { sessionId, answerId, outcome, answer?, citations?, fallback? }. outcome is answered or unanswered.

  • An answered result needs answer text. Citations are ids you retrieved. Optional URL and excerpt.
  • An unanswered result needs fallback and must not include answer text or citations.
  • Optional feedback takes { sessionId, answerId, helpful }. It stays on the adapter. There is no public feedback route on the Answers service.

createLocalAdapter is the sample. createByoAdapter(impl) returns your implementation. Hosted ask uses the same result shape.

Related: Grounding · BYO guide