> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/guardrails/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/guardrails/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/guardrails/_mcp/server.

# nemoguardrails.embeddings.providers.base

## Module Contents

### Classes

| Name                                                                         | Description                               |
| ---------------------------------------------------------------------------- | ----------------------------------------- |
| [`EmbeddingModel`](#nemoguardrails-embeddings-providers-base-EmbeddingModel) | Generic interface for an embedding model. |

### API

```python
class nemoguardrails.embeddings.providers.base.EmbeddingModel()
```

Abstract

Generic interface for an embedding model.

The embedding model is responsible for creating the embeddings given a list of
input texts.

```python
nemoguardrails.embeddings.providers.base.EmbeddingModel.encode(
    documents: typing.List[str]
) -> typing.List[typing.List[float]]
```

abstract

Encode the provided documents into embeddings.

**Parameters:**

The list of documents for which embeddings should be created.

**Returns:** `List[List[float]]`

List\[List\[float]]: The list of embeddings corresponding to the input documents.

```python
nemoguardrails.embeddings.providers.base.EmbeddingModel.encode_async(
    documents: typing.List[str]
) -> typing.List[typing.List[float]]
```

async

abstract

Encode the provided documents into embeddings.

**Parameters:**

The list of documents for which embeddings should be created.

**Returns:** `List[List[float]]`

List\[List\[float]]: The list of embeddings corresponding to the input documents.