#[non_exhaustive]pub enum EntityViewport {
Business,
Legal,
Technical,
Academic,
Personal,
Political,
Media,
Historical,
General,
Custom(String),
}Expand description
Viewport context for multi-faceted entity representation.
§Research Background
The concept of “Entity Viewports” comes from the observation that real-world entities are not monolithic - they present different facets depending on context:
- “Marie Curie” in an Academic context: physicist, Nobel laureate
- “Marie Curie” in a Technical context: radioactivity researcher, X-ray pioneer
- “Marie Curie” in a Personal context: mother, immigrant, educator
- “Marie Curie” in a Medical context: founder of mobile X-ray units
Rather than collapsing all information into a single vector, the viewport model preserves these distinctions and enables “projection” at query time.
§Usage in RAG Systems
When answering “What were Curie’s scientific contributions?”, retrieve
facts from the Academic viewport. When answering “What was Curie’s
personal life like?”, retrieve from Personal.
§Example
use anno_core::{Entity, EntityType, EntityViewport};
let mut entity = Entity::new("Marie Curie", EntityType::Person, 0, 11, 0.9);
entity.viewport = Some(EntityViewport::Academic);
assert!(entity.viewport.as_ref().unwrap().is_professional());Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Business
Business/financial context (CEO, revenue, market cap)
Legal
Legal context (lawsuits, settlements, compliance)
Technical
Technical/engineering context (patents, inventions, code)
Academic
Academic/research context (publications, citations, grants)
Personal
Personal/biographical context (family, hobbies, background)
Political
Political context (lobbying, donations, policy positions)
Media
Media/public relations context (interviews, statements, PR)
Historical
Historical context (past roles, timeline events)
General
Generic/unspecified context
Custom(String)
Custom viewport with a descriptive label
Implementations§
Trait Implementations§
Source§impl Clone for EntityViewport
impl Clone for EntityViewport
Source§fn clone(&self) -> EntityViewport
fn clone(&self) -> EntityViewport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more