# Use an embedding NVIDIA NIM to create a vector database
URL: https://docs.datarobot.com/en/docs/agentic-ai/vector-database/vector-dbs-nvidia-nim-embed.html

> Add a deployed embedding NVIDIA NIM to a Use Case with a vector database to enrich prompts in the playground with relevant context before they are sent to the LLM.

# Use an embedding NVIDIA NIM to create a vector database

> [!NOTE] Premium
> The use of NVIDIA Inference Microservices (NIM) in DataRobot requires access to premium features for GenAI experimentation and GPU inference. Contact your DataRobot representative or administrator for information on enabling the required features.

The NVIDIA Inference Microservices (NIM) available through Registry include embedding models. A deployed embedding model can be added to a Use Case, creating a collection of unstructured text that is broken into chunks, with embeddings generated for each chunk. Both the chunks and embeddings are stored in the vector database and are available for retrieval. Vector databases can optionally be used to ground the LLM responses to specific information and can be assigned to an LLM blueprint to leverage during a RAG operation. The role of the vector database is to enrich the prompt with relevant context before it is sent to the LLM. 
Each embedding NVIDIA NIM available is listed below:

- arctic-embed-l
- llama-3.2-nv-embedqa-1b-v2
- nv-embedqa-e5-v5
- nv-embedqa-e5-v5-pb24h2
- nv-embedqa-mistral-7b-v2
- nvclip

## Create a vector database with a registered embedding NIM

After you register an embedding NIM, you can add it to a vector database. DataRobot handles the deployment process automatically.

To create a vector database with a registered embedding NVIDIA NIM:

1. On theRegistry > Modelstab, next to+ Register a model, clickand thenImport from NVIDIA NGC.
2. In theImport from NVIDIA NGCpanel, on theSelect NIMtab, click an embedding NIM in the gallery. Search the galleryTo direct your search for an embedding model, you canSearch, filter byPublisher, or clickSort byto order the gallery by date added or alphabetically (ascending or descending).
3. Review the model information from the NVIDIA NGC source, then clickNext.
4. On theRegister modeltab, configure the following fields and clickRegister: FieldDescriptionRegistered model name / Registered modelConfigure one of the following:Registered model name:When registering a new model, enter auniqueand descriptive name for the new registered model. If you choose a name that exists anywhere within your organization, a warning appears.Registered model:When saving as a version of an existing model, select the existing registered model you want to add a new version to.Registered version nameAutomatically populated with the model name and the wordversion. Change the version name or modify the default version name as necessary.Registered model versionAssigned automatically. This displays the expected version number of the version (e.g., V1, V2, V3) you create. This is alwaysV1when you selectRegister as a new model.Resource bundleRecommended automatically. If possible, DataRobot translates the GPU requirements for the selected model into a resource bundle. In some cases, DataRobot can't detect a compatible resource bundle. To identify a resource bundle with sufficient VRAM, review the documentation for that NIM.NVIDIA NGC API keySelect the credential associated with your NVIDIA NGC API key.Optional settingsRegistered version descriptionEnter a description of the business problem this model package solves, or, more generally, describe the model represented by this version.TagsClick+ Add tagand enter aKeyand aValuefor each key-value pair you want to tag the modelversionwith. Tags added when registering a new model are applied toV1.
5. After the registered model builds, navigate toWorkbenchand open a Use Case.
6. In a Use Case, on theVector databasestab, either: With an existing vector databasesWithout an existing vector databaseIf you have already added one or more vector databases to the Use Case, Click the+ Add vector databasebutton in the upper right.If you haven't added a vector database to the Use Case before, clickCreate vector databasein the center of the page.
7. On theCreate vector databasepanel, enter a descriptiveName. Then, in theData sourcedropdown, select from the data sources associated with the Use Case or clickAdd datato add new data from the Data Registry.
8. In theEmbedding modeldropdown, click the embedding NIM you registered. Then, configure thevector databaseText chunkingsettingsand clickCreate vector database. The selected embedding model is deployed toConsolewhen you create the vector database. If necessary, this process creates a newprediction environmentfor NIM embeddings.

After creating a vector database, you can [manage](https://docs.datarobot.com/en/docs/agentic-ai/vector-database/vector-dbs.html#manage-vector-databases) and [version](https://docs.datarobot.com/en/docs/agentic-ai/vector-database/vector-versions.html) it, or [add it to an LLM in the playground](https://docs.datarobot.com/en/docs/agentic-ai/playground-tools/build-llm-blueprints.html#add-a-vector-database) to inform responses.

## Create a vector database with a deployed embedding NIM

If you've already registered and deployed an embedding NIM, you can add it to a vector database as a deployed embedding model.

To create a vector database with a registered and deployed embedding NVIDIA NIM:

1. In a Use Case, on theVector databasestile, either: With an existing vector databasesWithout an existing vector databaseIf you have already added one or more vector databases to the Use Case, Click the+ Add vector databasebutton in the upper right.If you haven't added a vector database to the Use Case before, clickCreate vector databasein the center of the page.
2. On theCreate vector databasepanel, enter a descriptiveName. Then, in theData sourcedropdown, select from the data sources associated with the Use Case or clickAdd datato add new data from the Data Registry.
3. In theEmbedding modeldropdown, clickAdd deployed embedding model.
4. On the next page, configure the following settings to add the NVIDIA NIM embedding model, then clickValidate and add: FieldDescriptionNameEnter a descriptive name for the embedding model you're creating.Deployment nameIn the list, locate the name of the NVIDIA NIM embedding modelregistered and deployed in DataRobotand click the deployment name.Prompt column nameEnterinputas the prompt column name.Response column nameEnterresultas the response column name. Validation processThe validation process can take a few minutes. A notification appears when the process starts and if it succeeds or fails.
5. After the validation of the deployed embedding model succeeds, open theEmbedding modelmenu, then, underDeployed embedding models, select the NVIDIA NIM embedding model.
6. Configure thevector databaseText chunkingsettings, then clickCreate vector database.

After creating a vector database, you can [manage](https://docs.datarobot.com/en/docs/agentic-ai/vector-database/vector-dbs.html#manage-vector-databases) and [version](https://docs.datarobot.com/en/docs/agentic-ai/vector-database/vector-versions.html) it, or [add it to an LLM in the playground](https://docs.datarobot.com/en/docs/agentic-ai/playground-tools/build-llm-blueprints.html#add-a-vector-database) to inform responses.

---
