Open adarshdotexe opened 3 weeks ago
@adarshdotexe another workaround is to use the baai/bge-m3 model, which is symmetric and does not require the input_type=passage/query prompting
"embeddingsProvider": {
"provider": "openai",
"model": "baai/bge-m3",
"apiBase": "https://integrate.api.nvidia.com/v1",
"apiKey": "nvapi-..."
}
Validations
Problem
Currently the nemo-retriever architecture proposes a method to generate different embeddings based on if the input type is a passage (during vectorDB creation) or a query (during RAG using preexisting vectorDB). This currently is not supposed by the BaseEmbeddingProvider.
Reference: https://docs.nvidia.com/nim/nemo-retriever/text-embedding/latest/overview.html
This is a standard practice in most embedding models, langchain implements two functions for example, one for documents (passage) and other for queries.
Reference: https://python.langchain.com/v0.1/docs/modules/data_connection/text_embedding/
WAR to use nvidia nim for embedding generation
The following can be added to ~/.continue/config.ts
Solution
Distinctions need to be made whenever the embeddings provider's embed function is called to differentiate between a passage and a query call for embeddings generation.