You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<query-profile id="NearestNeighborTestProfile" type="NearestNeighborTypes">
<field name="yql">select * from sources * where %{.nn-input} or userQuery()</field>
<field name="nn-input">({targetHits:10}nearestNeighbor(body_embedding,q))</field>
<field name="input.query(q)">embed(e5,@query)</field>
<field name="input.query(subjectWeight)">5</field>
<field name="ranking.profile">my_rank_profile</field>
</query-profile>
Deploy Schema and see error
Error: invalid application package (status 400)
Invalid application:
Error reading query profile 'NearestNeighborTestProfile' of type 'NearestNeighborTestTypes':
Could not set 'input.query(q)' to 'embed(e5,@query)':
Can't find embedder 'e5'. Available embedder ids are 'default'.
Move the embed(e5,@query) into the search request and deploy the schema
<query-profile id="NearestNeighborTestProfile" type="NearestNeighborTypes">
<field name="yql">select * from sources * where %{.nn-input} or userQuery()</field>
<field name="nn-input">({targetHits:10}nearestNeighbor(body_embedding,q))</field>
<field name="input.query(subjectWeight)">5</field>
<field name="ranking.profile">my_rank_profile</field>
</query-profile>
Expected behavior
It is possible to set the ranking embedder via QueryProfile. Setting rankProfile inputs through QueryProfile alters the preset in the rankProfile, observable in the matchfeatures.
Environment (please complete the following information):
Dockerized Vespa
Vespa version
Vespa version: 8.475.11
The text was updated successfully, but these errors were encountered:
Query profiles must use the full name, ranking.features, aliases like input are only supported in queries.
The assumption behind this is that brevity matters more in requests and structure more in query profiles, but even though it is mentioned in the doc I think it is too easy to miss, so we should probably add alias support in query profiles as well. Let's use this issue for that.
bratseth
changed the title
Setting rankProfile inputs via queryProfile
Support query API property aliases in query profiles
Feb 14, 2025
Describe the bug
Rank-profile inputs are not set via query-profile.
To Reproduce
Steps to reproduce the behavior:
Embedder in services.xml
Query-profile type:
Query-profile:
Expected behavior
It is possible to set the ranking embedder via QueryProfile. Setting rankProfile inputs through QueryProfile alters the preset in the rankProfile, observable in the matchfeatures.
Environment (please complete the following information):
Dockerized Vespa
Vespa version
Vespa version: 8.475.11
The text was updated successfully, but these errors were encountered: