Merge pull request #1 from AnilAren/AnilAren-patch-1

Update supported_embedding.md
This commit is contained in:
AnilAren 2025-06-03 15:06:10 +05:30 • committed by GitHub
commit ddc7d14cb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -310,9 +310,25 @@ import os
os.environ['NVIDIA_NIM_API_KEY'] = ""
response = embedding(
model='nvidia_nim/<model_name>',
input=["good morning from litellm"]
input=["good morning from litellm"],
input_type="query"
)
```
## `input_type` Parameter for Embedding Models
Certain embedding models, such as `nvidia/embed-qa-4` and the E5 family, operate in **dual modes**—one for **indexing documents (passages)** and another for **querying**. To maintain high retrieval accuracy, it's essential to specify how the input text is being used by setting the `input_type` parameter correctly.
### Usage
Set the `input_type` parameter to one of the following values:
- `"passage"` – for embedding content during **indexing** (e.g., documents).
- `"query"` – for embedding content during **retrieval** (e.g., user queries).
> **Warning:** Incorrect usage of `input_type` can lead to a significant drop in retrieval performance.
All models listed [here](https://build.nvidia.com/explore/retrieval) are supported:
| Model Name | Function Call |
@ -327,6 +343,7 @@ All models listed [here](https://build.nvidia.com/explore/retrieval) are support
| snowflake/arctic-embed-l | `embedding(model="nvidia_nim/snowflake/arctic-embed-l", input)` |
| baai/bge-m3 | `embedding(model="nvidia_nim/baai/bge-m3", input)` |
## HuggingFace Embedding Models
LiteLLM supports all Feature-Extraction + Sentence Similarity Embedding models: https://huggingface.co/models?pipeline_tag=feature-extraction