pub struct TextAnnotation {
pub start: usize,
pub end: usize,
pub origin: String,
pub source: AnnotationSource,
pub external_id: Option<String>,
pub verified: Option<VerificationVerdict>,
}Expand description
A claim-level citation attached to a span of generated text.
The single shared type across every citation capability: a text span linked
to a source. Producers agree only on this render contract — each capability
keeps its own richer representation (e.g. KnowledgeIndexCitation) and maps
into this envelope at emit time. See knowledge/runtime-resources/citations.md.
Fields§
§start: usize0-indexed start char offset into the enclosing TextContentPart.text.
end: usizeExclusive end char offset.
origin: StringCapability id that produced this annotation (e.g. citation_retrieval).
Lets the UI and evals attribute and filter each citation by feed.
source: AnnotationSourceThe cited source.
external_id: Option<String>Opaque producer id (e.g. kchk_…, kbe_…, a URL hash). Not interpreted
by the render contract.
verified: Option<VerificationVerdict>Verification verdict, filled by the citation_verification capability.
Absent means unverified (not “unsupported”).
Trait Implementations§
Source§impl Clone for TextAnnotation
impl Clone for TextAnnotation
Source§fn clone(&self) -> TextAnnotation
fn clone(&self) -> TextAnnotation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more