FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
31.25k stars 16.27k forks source link

[BUG] Mistra-embed: Bad request #2978

Closed IzzyHibbert closed 3 months ago

IzzyHibbert commented 3 months ago

I decided to open single and specific tickets instead of a unique one 2944 because after a bit of investigation the KO on different embeddings have nothing in common.

Test performed on Flowise 2.0.1, installed in Docker.

Mistral Embeddings (model name: mistral-embed).

The outcome is this : Screenshot 2024-08-07 alle 09 56 31

with Flowise debug being

Screenshot 2024-08-07 alle 09 57 03

HenryHengZJ commented 3 months ago

what is your settings? Flowise running on Docker, and Mistral cloud embeddings? or self hosted

IzzyHibbert commented 3 months ago

what is your settings? Flowise running on Docker, and Mistral cloud embeddings? or self hosted

Flowise is in Docker, Mistral it's their cloud.

HenryHengZJ commented 3 months ago

I'm running Flowise on Docker, using Mistral cloud:

image

image

seems to be working as expected

IzzyHibbert commented 3 months ago

Hi @HenryHengZJ I think I possibly have found a candidate for the issue.. You have shown an upsert. I was instead trying to use the chat. Well, the vector store I was using was Qdrant, where I left these settings :

Screenshot 2024-08-08 alle 13 53 20

So, the vector dimension set here is/was the one of OpenAI: 1536. Doc was upserted and let's say ok.

Then I made a chat test but switched to Mistral-embed, who is using 1024. I realized it because I tried to do the upsert as you made. No doc upserted but at least I saw a nice specaking error in the screen.

When I made the tests with the chat here, it was "Bad Request", so maybe there is a generic issue of not correctly throwing the message. Anyway, I made a new collection in Qdrant and set it to 1024 (still using Mistral-embed) and it went OK 😁.

I'd say there is anything wrong, except the "Bad request" being a bit mysterious. Or maybe there is a chance that the detail be added somewhere (even on mouse over in the title of the settings for the dimensions, for instance. Up to you if you want to use the issue for implementing something or prefer to close it.

(I switch to retest the other two options, LocalAI and Ollama embedding... might end that the root cause is the same).

HenryHengZJ commented 3 months ago

I think this is the default message coming from 3rd party, we could have a look and see how to improve the error messaging and validation check in future. Closing for now