chatgpt-retrieval-plugin icon indicating copy to clipboard operation
chatgpt-retrieval-plugin copied to clipboard

Error parsing vector similarity query

Open cocomongg opened this issue 1 year ago • 5 comments

When I upsert pdf file with redis and call /query, log becomes like this [Error: Error parsing vector similarity query: query vector blob size (12288) does not match index's expected size (40).]

cocomongg avatar May 26 '23 08:05 cocomongg

I have the same issue

zeinabfarhoudi avatar Jun 21 '23 14:06 zeinabfarhoudi

使用 RediSearchUtil.ToByteArray() 函数进行转换一下就好 byte [] data = RediSearchUtil.ToByteArray(float[])

cyyinfo avatar Aug 15 '23 07:08 cyyinfo

We encountered the same issue, which arose due to a data type mismatch between the index and values. If the index is created using FLOAT32, the vector should be specified as float32.

pnvasanth avatar Nov 21 '23 15:11 pnvasanth

使用 RediSearchUtil.ToByteArray() 函数进行转换一下就好 byte [] data = RediSearchUtil.ToByteArray(float[])

请问可以帮忙给个具体的操作方式么。目前使用langchain,在存储和查询时,是有Buffer.from(new Float32Array(vector).buffer)一遍的

bruceweasley88 avatar Jan 03 '24 18:01 bruceweasley88

vectorStore.similaritySearch(searchRequest) .stream() .map(Documents::fromDocument) .toList();

mingMens avatar Apr 11 '24 09:04 mingMens