Skip to content

Commit

Permalink
Integrate explainability for hybrid query into RRF processor (#1037)
Browse files Browse the repository at this point in the history
* Integrate explainability for hybrid query into RRF processor

Signed-off-by: Martin Gaievski <[email protected]>
  • Loading branch information
martin-gaievski committed Jan 13, 2025
1 parent 6e5596d commit 312c7f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import com.google.common.annotations.VisibleForTesting;
import lombok.Getter;
import org.opensearch.ml.repackage.com.google.common.annotations.VisibleForTesting;
import org.opensearch.neuralsearch.processor.combination.ScoreCombinationTechnique;
import org.opensearch.neuralsearch.processor.normalization.ScoreNormalizationTechnique;
import org.opensearch.search.fetch.FetchSearchResult;
Expand Down Expand Up @@ -80,6 +79,7 @@ <Result extends SearchPhaseResult> void hybridizeScores(
.combinationTechnique(combinationTechnique)
.explain(explain)
.pipelineProcessingContext(requestContextOptional.orElse(null))
.searchPhaseContext(searchPhaseContext)
.build();
normalizationWorkflow.execute(normalizationExecuteDTO);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ protected void createRRFSearchPipeline(final String pipelineName, boolean addExp
if (addExplainResponseProcessor) {
builder.startArray("response_processors")
.startObject()
.startObject("explanation_response_processor")
.startObject("hybrid_score_explanation")
.endObject()
.endObject()
.endArray();
Expand Down

0 comments on commit 312c7f7

Please sign in to comment.