Documentation
¶
Index ¶
Constants ¶
const ( PlacementSourceAuto = "auto" PlacementSourceManual = "manual" )
Placement source values attached to accepted placement instances.
const ( RunStatusCompleted = "completed" RunStatusPartial = "partial" RunStatusBudgetExhausted = "budget_exhausted" RunStatusTimedOut = "timed_out" RunStatusFailed = "failed" )
const ( RunReasonResolvedAll = "resolved_all" RunReasonUnresolvedFields = "unresolved_fields" RunReasonBudgetExhausted = "budget_exhausted" RunReasonTimedOut = "timed_out" RunReasonResolverError = "resolver_error" RunReasonResolverShortStop = "resolver_short_circuit" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Estimate ¶
type Estimate struct {
ResolverID string
Accuracy float64
Cost float64
Latency float64
Supported bool
Reason string
}
Estimate captures pre-execution resolver quality/cost/latency estimates.
type ExecutionLimits ¶
ExecutionLimits controls max budget/time constraints for a run.
type ExistingPlacement ¶
ExistingPlacement represents already-authored field placements.
type FieldDefinition ¶
type FieldDefinition struct {
ID string
ParticipantID string
FieldType string
Label string
Required bool
}
FieldDefinition is a logical definition input for placement suggestions.
type NativeFormField ¶
NativeFormField represents an extracted native form field from a PDF source.
type Policy ¶
type Policy struct {
EnabledResolvers []string
HardOrder []string
Weights ScoringWeights
Limits ExecutionLimits
}
Policy is the effective placement policy applied to a run.
type ResolveResult ¶
type ResolveResult struct {
Suggestions []Suggestion
UnresolvedDefinitionIDs []string
Terminate bool
TerminationReason string
}
ResolveResult captures resolver output and optional short-circuit directives.
type ResolverScore ¶
type ResolverScore struct {
ResolverID string
Accuracy float64
Cost float64
Latency float64
Score float64
Supported bool
Reason string
}
ResolverScore captures final weighted ranking score metadata.
type Run ¶
type Run struct {
ID string
AgreementID string
Status string
ReasonCode string
Policy Policy
ResolverOrder []string
ExecutedResolvers []string
Estimates []Estimate
Scores []ResolverScore
Suggestions []Suggestion
UnresolvedDefinitionIDs []string
SelectedSource string
BudgetUsed float64
Elapsed time.Duration
CreatedByUserID string
CreatedAt time.Time
CompletedAt time.Time
}
Run captures full run telemetry and merged suggestions.
type ScoringWeights ¶
ScoringWeights controls weighted utility ranking.
type Suggestion ¶
type Suggestion struct {
ID string
FieldDefinitionID string
ResolverID string
Confidence float64
Geometry Geometry
Label string
Metadata map[string]any
}
Suggestion captures one candidate placement for a field definition.
func (Suggestion) NormalizedConfidence ¶
func (s Suggestion) NormalizedConfidence() float64
NormalizedConfidence clamps confidence into [0,1].