Error on Query endpoint : ApiException: (400)

Hey all,
I am trying to implement Generative Pseudo-Labeling (GPL) in a Sentence Transformer model where I am making use of a Pinecone index in the negative mining step.

The output of index.describe_index_stats() is

{'dimension': 384,
 'index_fullness': 0.0,
 'namespaces': {'': {'vector_count': 15025}},
 'total_vector_count': 15025}

When I try to query the index using

res = index.query(query_embs.tolist(), top_k=10)

the query endpoint throws a 400 Bad request error

ApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'content-type': 'application/json', 'date': 'Thu, 09 Mar 2023 19:25:15 GMT', 'x-envoy-upstream-service-time': '1', 'content-length': '110', 'server': 'envoy'})
HTTP response body: {"code":3,"message":"Query vector dimension 38400 does not match the dimension of the index 384","details":[]}

Is seems the part of the process that is generating the vector for the query is generating a vector with 38400 dimensions. It looks like you want it to be 384 instead. The maximum vector dimension for Pinecone is 20K (which is huge).