ERROR FAISS Vector Store Creator

I am running a KNIME sample process about generating a local Vector Store and the FAISS Vector Store Creator node is running errorly. The error message is ''ERROR FAISS Vector Store Creator 3:2858 Execute failed: Error code: 400 - {‘error’: {‘message’: ‘invalid input type’, ‘type’: ‘api_error’, ‘param’: None, ‘code’: None}}“

When I use Chroma Vector Store Creator, I am running into the same error:“ERROR FAISS Vector Store Creator 3:2858 Execute failed: Error code: 400 - {‘error’: {‘message’: ‘invalid input type’, ‘type’: ‘api_error’, ‘param’: None, ‘code’: None}}”

The input model is OpenAI Embeddings Connector, and the settings are as shown in the figure:

The text data is in the example without any changes.

Hope to get help from the sample author @Vittorio Haardt and @Roberto Cadili , thanks

Hello @MRAZ,

Can you share the example workflow you are using? This will help us check the input data and better understand why you are encountering this error.

Best,
Keerthan

1 Like

Hello, I’m glad to hear from you, and I’m sorry I didn’t see the reply message in time. The problem described in the post occurs when I execute this sample workflow: https://hub.knime.com/knime/spaces/AI%20Extension%20Example%20Workflows/3)%20Vector%20Stores/3.1%20-%20Create%20a%20Vector%20Store~ivErzOIllu5B6zt6/most-recent

I found that since I don’t have the api key of openAI, I set the advanced setting of the openAI authenticator of the workflow to the local Ollama api interface localhost: 11434, because the previous setting can also run through other workflows. In openAI embedding connector, I tried the embedding models of bge-m3 and Chroma/all-minilm-l6-v2-f32 in the local Ollama list in all models mode of node configuration, and the error situation I described in this post occurred.

After that, I also tried to implement the creation of FAISS vector library via gpt4all embeddings connector node, the relevant workflow is:
https://hub.knime.com/knime/spaces/AI%20Extension%20Example%20Workflows/5)%20Use%20Cases/RFI%20Chatbot/Vector%20store%20creation~AEz6GlD6Q85iO4dA/current-state

In gpt4all embeddings connector node‘s configuration, I chose the model all-MiniLM-L6-v2-f16. gguf which was downloaded in the local filesystem, during execution the node produces an error message:

GPT4All Embeddings Connector

Execute failed: The model at path /Users/***/Embedding Model/all-MiniLM-L6-v2-f16.gguf is not valid.

At present, I haven’t been able to solve these problems. I hope I can get your help. If I need additional information, I am very willing to cooperate. Thank you again!

I’m afraid I have somewhat bad news for you.

Your instinct to point the OpenAI Connector to a local base URL where Ollama is hosted is really good. Unfortunately Ollama does not support the OpenAI Embeddings API. There’s been a community request for this for a while but to the best of my knowledge it has not yet been implemented:

Can’t comment on GPT4all, but I take it has to do with the path not working (stating the obvious).

I take you have set the path? typically if it is a local path (e.g. in Excel Reader), I’d expect something like C:/Windows/Users/… .

Are you sure the path to your .gguf file is correct?

3 Likes

Hi @MRAZ for your detailed explanation!

Regarding your first issue, as mentioned in this blog post:

“To leverage Ollama’s vision and embedding models, you need to use the nodes from the KNIME REST Client Extension, as direct connection via OpenAI Embedding Connector is not supported.”

This means you cannot connect directly to the embedding model through the OpenAI Embedding Connector. I recommend either:

  1. Using the GPT4All Embeddings Connector as in the below provided example.
  2. Utilizing the KNIME REST Client Extension to interact with Ollama’s embeddings.

For your second issue with the GPT4All Embeddings Connector, the error suggests that the model path might be incorrect. I recommend:

  • Clicking the yellow folder icon in the configuration window.
  • Manually selecting the correct file (all-MiniLM-L6-v2-Q4_0.gguf).
  • Ensuring the model file is valid and properly downloaded.

I have attached this workflow that might help.

Best,
Keerthan

3 Likes

Hi @MartinDDDD Thank you very much for your suggestion, so that I am no longer bothered by openAI directly calling the ollama embedding model. I also checked the path setting of the GPT4ALL embeddings connector. Combined with @k10shetty1 's suggestion, I replaced the embedding model. Currently, the GPT4ALL embeddings connector The node is running normally, but the FAISS Vector Store Creator node generated another error. Good news always follows bad news, at least one step forward, isn’t it? Thank U

Hi @k10shetty1 Any help is greatly appreciated, at the moment I’ve chosen the embedding model you recommended. The gpt4all node runs normally after setting it to the new model. Of course, when running the FAISS Vector Store Creator node, a new error appears with the error message:
ERROR FAISS Vector Store Creator 3: 2 Execute failed: Failed to generate embeddings: unknown model MiniLM L6 H384 Unbased, specify a prefix if applicable or an empty string

I hope to continue to get your help, thank you very much!

Also, if I already have ready-made vectors, such as those generated by calling ollama embeddings model with the REST API, can I generate FAISS vector store without using the FAISS vector store Creator node?

@MRAZ I am not able to reproduce the error you are facing. Can you confirm if you did download the model from nomic.ai and select it in the GPT4All Embeddings Connector node?

image

Can you uplaod your workflow here to see what is causing the issue.

You can select the already available embeddings in the embeddings column option of the FAISS Vector Store Creator Node. But you have to connect it to the Embeddings Connector node.

Here is an example where your embeddings are strings. Hope this helps.

Best,
Keerthan

1 Like

Hi @k10shetty1 The local embedding model I use is downloaded on the GPT4ALL client software, which should be what you call nomic.ai. The workflow is you shared which name is Forum_86963. Once again, thanks for your advice and sharing.

Hi @k10shetty1 It succeed that using the REST API to call ollama’s local emdedding model for vectorization, and be input to the FAISS Vector Store Create node together with the document and local emdedding models to generate the FAISS vector storage. Thank your good idea.

2 Likes