Expand description
Entity Extraction - LLM-powered entity and relation extraction
TigerStyle: Sim-first, deterministic, graceful degradation.
See ADR-014 for design rationale.
§Architecture
EntityExtractor<P: LLMProvider>
├── extract() → ExtractionResult
├── extract_entities_only() → Vec<ExtractedEntity>
└── Uses prompts::build_extraction_prompt()§Usage
use umi_memory::extraction::{EntityExtractor, ExtractionOptions};
use umi_memory::llm::SimLLMProvider;
#[tokio::main]
async fn main() {
let provider = SimLLMProvider::with_seed(42);
let extractor = EntityExtractor::new(provider);
let result = extractor.extract("Alice works at Acme Corp", ExtractionOptions::default()).await.unwrap();
println!("Found {} entities", result.entity_count());
}Structs§
- Entity
Extractor - Entity extractor using LLM.
- Extracted
Entity - Entity extracted from text by LLM.
- Extracted
Relation - Relation between two entities extracted from text.
- Extraction
Options - Options for entity extraction.
- Extraction
Result - Result of entity extraction from text.
Enums§
- Entity
Type - Types of entities that can be extracted.
- Extraction
Error - Errors from entity extraction.
- Relation
Type - Types of relations between entities.
Functions§
- build_
extraction_ prompt - Build the full extraction prompt.