KnowledgeHit

One matching passage, as a provider returns it from search.

The framework parses it, keeps it only if its binding belongs to the calling scope, and shows it to the model as an untrusted excerpt it can cite.

Fields

doc_idstringrequired

The document the passage is from.

versionstringrequired

The document version the passage is from.

spanSpanrequired

Half-open range [start, end) in UTF-8 BYTE offsets of the referenced text or artifact bytes.

textstringrequired

The passage's text.

scorenumberrequired

How well the passage matches the query; higher is better. The scale is the provider's own (local_knowledge uses the negated FTS5 bm25 rank).

bindingBindingrequired

Issued by the host; the provider stores it opaquely.

Edit on GitHub

On this page