> For the complete documentation index, see [llms.txt](https://docs.wisej.com/ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/ai/components/built-in-services/iembeddinggenerationservice.md).

# IEmbeddingGenerationService

## Overview

The [IEmbeddingGenerationService](/ai/components/api/services/iembeddinggenerationservice.md) offers a unified interface to embedding generation endpoints. It is used by all Wisej.AI components and tools that need to convert text chunks into vectors. Typically, it works in conjunction with the `IEmbeddingStorageService`.

The `DefaultEmbeddingGenerationService` implementation, as registered by Wisej.AI, utilizes the OpenAI endpoint. It accesses the [API key stored](/ai/components/api/helpers/wisej.ai.helpers.apikeys.md) in `ApiKeys.json` or the corresponding environment variable and employs the "text-embedding-3-small" model (1,536 dimensions) for generating embeddings.

See [Embedding Generation](/ai/concepts/vector-databases.md#embedding-generation) for more information on how to change the default model and provider.

## Default Implementation

The default implementation of the [`IEmbeddingGenerationService`](/ai/components/api/services/iembeddinggenerationservice.md) interface is provided by the [`DefaultEmbeddingGenerationService`](/ai/components/api/services/iembeddinggenerationservice/wisej.ai.services.defaultembeddinggenerationservice.md) class. This class employs the [`OpenAIEndpoint`](/ai/components/api/smartendpoint/wisej.ai.endpoints.openaiendpoint.md) as its standard endpoint for embedding generation. In addition to the DefaultEmbeddingGeneration service, Wisej.AI also offers the [HuggingFaceEmbeddingGenerationService](/ai/components/api/services/iembeddinggenerationservice/wisej.ai.services.huggingfaceembeddinggenerationservice.md) implementation.

For further details and to access the source code of the built-in implementations, please refer to the [Embedding Generation](/ai/concepts/vector-databases.md#embedding-generation) page.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/ai/components/built-in-services/iembeddinggenerationservice.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
