[maxwell][suggestion engine] Ranking adjustments
Adding ranking logging, and zeroing out the query-matching feature.
Change-Id: I3d60ab316f031fef657f46937c31184e3e32b8e4
diff --git a/bin/suggestion_engine/ranked_suggestions.cc b/bin/suggestion_engine/ranked_suggestions.cc
index 11459e9..5684b72 100644
--- a/bin/suggestion_engine/ranked_suggestions.cc
+++ b/bin/suggestion_engine/ranked_suggestions.cc
@@ -65,6 +65,11 @@
// zero to guarantee final confidence values stay within the 0-1 range.
FXL_CHECK(normalization_factor_ > 0.0);
suggestion->confidence = std::max(confidence, 0.0) / normalization_factor_;
+ FXL_LOG(INFO) << "Proposal "
+ << suggestion->prototype->proposal->display->headline
+ << " confidence "
+ << suggestion->prototype->proposal->confidence << " => "
+ << suggestion->confidence;
}
DoStableSort();
channel_->DispatchInvalidate();
diff --git a/bin/suggestion_engine/suggestion_engine_impl.cc b/bin/suggestion_engine/suggestion_engine_impl.cc
index 4b4b663..77d36c8 100644
--- a/bin/suggestion_engine/suggestion_engine_impl.cc
+++ b/bin/suggestion_engine/suggestion_engine_impl.cc
@@ -79,13 +79,13 @@
// Set up the next ranking features
next_suggestions_->AddRankingFeature(1.0, proposal_hint_feature);
- next_suggestions_->AddRankingFeature(-0.2, kronk_feature);
+ next_suggestions_->AddRankingFeature(-0.1, kronk_feature);
// Set up the query ranking features
ask_suggestions_->AddRankingFeature(1.0, proposal_hint_feature);
- ask_suggestions_->AddRankingFeature(-0.2, kronk_feature);
+ ask_suggestions_->AddRankingFeature(-0.1, kronk_feature);
ask_suggestions_->AddRankingFeature(
- 1.0, std::make_shared<QueryMatchRankingFeature>());
+ 0, std::make_shared<QueryMatchRankingFeature>());
}
void SuggestionEngineImpl::AddNextProposal(ProposalPublisherImpl* source,