On doing a Hybrid Search by providing my own vectors, the query seems to fail. I’m using the python client to do the following query:
query = "jobs in research"
search_vector = model.encode("query: " + query)
response = (
client.query.get(
"Content",
["source_content"])
.with_hybrid(query=query, alpha=0.75, vector=search_vector, fusion_type=HybridFusion.RELATIVE_SCORE)
.with_additional("score")
.with_autocut(3)
.do()
)
The error response I get is as follows:
{'errors': [{'locations': [{'column': 92, 'line': 1}],
'message': 'Syntax Error GraphQL request (1:92) Unexpected ...\n\n1: {Get{Title(hybrid:{query: "jobs in research", vector: [ 0.01308592 -0.04184871 0.03915516 ... -0.06351458 0.01686241\n ^\n2: 0.03818709], alpha: 0.75, fusionType: relativeScoreFusion}autocut: 3){source_title _additional {score }}}}\n',
'path': None}]}
Doing another query like this results in no errors and the expected results.
response = (
client.query.get(
"Content",
["source_content", "hasCategory { ... on KnowledgeSource { uri } }"])
.with_near_vector({'vector': search_vector})
.with_autocut(1)
.do()
)
What is the reason behind this? Is there anyway I can look at the graphql query being sent by the python client?