Hello, new user here and really enjoying working with pinecone.
I am building an app using nextjs + vercel ai sdk and i am getting very inaccurate results with using cosine search after embedding images. Well let me rephrase that… I am getting great results with the image but when I am describing an image with text and search against pinecone I am getting very very bad results. Here is a code example
Stack: Replicate (ImageBind), Pinecone
Here is how I generate embeddings
const response = await replicate.run(
"daanelson/imagebind:0383f62e173dc821ec52663ed22a076d9c970549c209666ac3db181618b7a304",
{
input: {
input: imageUrl,
modality: "vision",
}
},
wait: {
interval: 500,
}
}
);
when I query it would look something like this
const response = await replicate.run(
"daanelson/imagebind:0383f62e173dc821ec52663ed22a076d9c970549c209666ac3db181618b7a304",
{
input: {
input: imageUrl,
modality: "vision",
}
},
wait: {
interval: 500,
}
}
);
const queryResponse = await index.query({
vector: response,
topK: 5,
includeMetadata: true,
});
Or text
const response = await replicate.run(
"daanelson/imagebind:0383f62e173dc821ec52663ed22a076d9c970549c209666ac3db181618b7a304",
{
input: {
text_input: textInput,
modality: "vision",
}
},
wait: {
interval: 500,
}
}
);
const queryResponse = await index.query({
vector: response,
topK: 5,
includeMetadata: true,
});
I played around and created other indexes like a dotproduct and was getting significantly better results but i don’t think this is best for what i am attempting to do.
Anything I can do from the pinecone side with nodejs to make the search better?
Another Edit: I was only testing with about 5-10 records… maybe that had something to do with it? Would inserting a lot more data help me get better results?