Google-Cloud-Discoveryengine-V1
view release on metacpan or search on metacpan
lib/Google/Cloud/Discoveryengine/V1/SearchService.pm view on Meta::CPAN
is set to `RANK_BY_FORMULA`, the following expression types (and
combinations of those chained using + or
* operators) are supported:
* `double`
* `signal`
* `log(signal)`
* `exp(signal)`
* `rr(signal, double > 0)` -- reciprocal rank transformation with second
argument being a denominator constant.
* `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
* `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
signal2 | double, else returns signal1.
Here are a few examples of ranking formulas that use the supported
ranking expression types:
- `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
-- mostly rank by the logarithm of `keyword_similarity_score` with slight
`semantic_smilarity_score` adjustment.
- `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
is_nan(keyword_similarity_score)` -- rank by the exponent of
`semantic_similarity_score` filling the value with 0 if it's NaN, also
add constant 0.3 adjustment to the final score if
`semantic_similarity_score` is NaN.
- `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
of `keyword_similarity_score` with slight adjustment of reciprocal rank
of `semantic_smilarity_score`.
The following signals are supported:
* `semantic_similarity_score`: semantic similarity adjustment that is
calculated using the embeddings generated by a proprietary Google model.
This score determines how semantically similar a search query is to a
( run in 0.877 second using v1.01-cache-2.11-cpan-60884a8df76 )