openai / chatgpt-retrieval-plugin

The ChatGPT Retrieval Plugin lets you easily find personal or work documents by asking questions in natural language.
MIT License
21.06k stars 3.68k forks source link

Error parsing vector similarity query #286

Open cocomongg opened 1 year ago

cocomongg commented 1 year ago

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).]

zeinabfarhoudi commented 1 year ago

I have the same issue

cyyinfo commented 1 year ago

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

pnvasanth commented 12 months ago

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.

bruceweasley88 commented 10 months ago

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

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

mingMens commented 7 months ago

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