This is achieved by imitating existing rules. Works as expected.
string storeVisited = CookieHelper.GetCookie("VisitedStore");
WhenFieldAndQueryStringMatches<RuleBoostingContext> ruleCondition = args.RuleCondition as WhenFieldAndQueryStringMatches<RuleBoostingContext>;
string operatorId = ruleCondition.OperatorId;
string fieldName = ruleCondition.FieldName;
if (operatorId.EqualsId(Sitecore.XA.Foundation.Search.Templates.IsEqualTo.Id))
args.Predicate = (Expression<Func<ContentPage, bool>>)(c => c[fieldName].Equals(storeVisited).Boost<bool>(args.Boost) || c.Name != string.Empty);
else if (operatorId.EqualsId(Sitecore.XA.Foundation.Search.Templates.IsNotEqualTo.Id))
args.Predicate = (Expression<Func<ContentPage, bool>>)(c => !c[fieldName].Equals(storeVisited).Boost<bool>(args.Boost) || c.Name != string.Empty);
else if (operatorId.EqualsId(Sitecore.XA.Foundation.Search.Templates.Contains.Id))
args.Predicate = (Expression<Func<ContentPage, bool>>)(c => c[fieldName].Contains(storeVisited).Boost<bool>(args.Boost) || c.Name != string.Empty);
else if (operatorId.EqualsId(Sitecore.XA.Foundation.Search.Templates.StartsWith.Id))
args.Predicate = (Expression<Func<ContentPage, bool>>)(c => c[fieldName].StartsWith(storeVisited).Boost<bool>(args.Boost) || c.Name != string.Empty);
else if (operatorId.EqualsId(Sitecore.XA.Foundation.Search.Templates.EndsWith.Id))
args.Predicate = (Expression<Func<ContentPage, bool>>)(c => c[fieldName].EndsWith(storeVisited).Boost<bool>(args.Boost) || c.Name != string.Empty);
else if (operatorId.EqualsId(Sitecore.XA.Foundation.Search.Templates.IsCaseInsensitivelyEqualTo.Id))
args.Predicate = (Expression<Func<ContentPage, bool>>)(c => c[fieldName].Equals(storeVisited, StringComparison.OrdinalIgnoreCase).Boost<bool>(args.Boost) || c.Name != string.Empty);
else if (operatorId.EqualsId(Sitecore.XA.Foundation.Search.Templates.IsNotCaseInsensitivelyEqualTo.Id))
args.Predicate = (Expression<Func<ContentPage, bool>>)(c => !c[fieldName].Equals(storeVisited, StringComparison.OrdinalIgnoreCase).Boost<bool>(args.Boost) || c.Name != string.Empty);
else
args.Predicate = (Expression<Func<ContentPage, bool>>)(contentPage => true);
}