diff --git a/planengine/config.go b/planengine/config.go index d1cf67e..d0f4bed 100644 --- a/planengine/config.go +++ b/planengine/config.go @@ -30,6 +30,7 @@ const ( WSPong = "pong" HealthCheckGracePeriod = 30 * time.Minute TaskTimeout = 30 * time.Second + GroundingThreshold = 0.90 CompensationDataStoredLogType = "compensation_stored" CompensationAttemptedLogType = "compensation_attempted" CompensationCompleteLogType = "compensation_complete" diff --git a/planengine/orchestrate.go b/planengine/orchestrate.go index aceffd0..03553dc 100644 --- a/planengine/orchestrate.go +++ b/planengine/orchestrate.go @@ -942,7 +942,7 @@ func (o *Orchestration) MatchingGroundingAgainstAction(ctx context.Context, matc normalizedPlanAction := normalizeActionPattern(o.Action.Content) normalizedUseCase := normalizeActionPattern(useCase.Action) - hasMatch, score, err := matcher.MatchTexts(ctx, normalizedPlanAction, normalizedUseCase, 0.75) + hasMatch, score, err := matcher.MatchTexts(ctx, normalizedPlanAction, normalizedUseCase, GroundingThreshold) if err != nil { return nil, 0, fmt.Errorf("failed to match action: %w", err) }