Package-level declarations

Types

Link copied to clipboard
class AdaptiveContextCompressor(shortThreshold: Int = 500, mediumThreshold: Int = 2000) : ContextCompressor

Hybrid compressor that uses different strategies based on text length.

Link copied to clipboard

Unconditionally mints a fresh NewEntity for every suggestion.

Link copied to clipboard

Built-in prompt strategies for LlmCandidateBakeoff.

Link copied to clipboard

Strategy for building prompts used in LLM candidate bakeoff.

Link copied to clipboard
data class BakeoffSelection(val selectedCandidate: Int?, val reason: String)

Structured response from the bakeoff LLM.

Link copied to clipboard

Selects the best match from multiple candidates.

Link copied to clipboard

A searcher that finds candidate entities for a suggested entity.

Link copied to clipboard

Entity resolver that delegates to multiple resolvers in order.

Link copied to clipboard

Compresses source text to extract only the portions relevant to entity resolution.

Link copied to clipboard
class EscalatingEntityResolver(searchers: List<CandidateSearcher>, candidateBakeoff: CandidateBakeoff? = null, contextCompressor: ContextCompressor? = null, config: EscalatingEntityResolver.Config = Config()) : EntityResolver

Entity resolver that walks a chain of CandidateSearchers from cheapest to most expensive, stopping as soon as one returns a confident match. If no searcher is confident, the accumulated candidates go to an optional LLM bakeoff; if that also finds nothing, a new entity is minted (or vetoed if the schema forbids creation).

Link copied to clipboard

Entity resolver that remembers entities it's been asked to resolve and tries to reuse them. Useful for deduplicating entities within a single session.

Link copied to clipboard
class KnownEntityResolver(knownEntities: List<<Error class: unknown class>>, delegate: EntityResolver) : EntityResolver

Entity resolver decorator that checks a list of known entities before delegating to another resolver.

Link copied to clipboard
data class LevelResult(val level: ResolutionLevel, val resolution: SuggestedEntityResolution?, val confidence: Double, val candidatesConsidered: Int = 0)

The outcome of a single resolution attempt, including which level resolved it and how many candidates were considered.

Link copied to clipboard
data class LlmCandidateBakeoff(llmOptions: <Error class: unknown class>, ai: <Error class: unknown class>, promptStrategy: BakeoffPromptStrategy = BakeoffPromptStrategies.COMPACT) : CandidateBakeoff

Uses an LLM to select the best match from multiple candidates.

Link copied to clipboard

No-op compressor that returns text unchanged.

Link copied to clipboard

Which strategy successfully resolved an entity. Lower levels are faster and cheaper; higher levels pull in the LLM.

Link copied to clipboard
data class SearchResult(val confident: <Error class: unknown class>? = null, val candidates: List<<Error class: unknown class>> = emptyList())

Result of a candidate search operation.

Link copied to clipboard
class SentenceContextCompressor(maxSentences: Int = 3, includeSurrounding: Boolean = true) : ContextCompressor

Extracts context by finding sentences containing the entity.

Link copied to clipboard
data class VerificationResult(val isMatch: Boolean, val reason: String)

Structured response for single candidate verification.

Link copied to clipboard
class WindowContextCompressor(windowChars: Int = 100, maxSnippets: Int = 3, maxTotalChars: Int = 500) : ContextCompressor

Extracts a window of text around each mention of the entity.