> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/getting-started/core-ai-concepts/embeddings.md).

# Embeddings

### What is an embedding?

Embeddings are numerical representations of concepts converted to number sequences, which make it easy for computers to understand the relationships between those concepts. They are capable of capturing the context of a word in a document, its semantic and syntactic similarity, and its relation with other words.

### How can I select different types of embeddings in Stack AI?

Embeddings can be selected by the user in two different section of Stack AI platform.

* The most intuitive place is in a `vector store`. As explained in section, the input will be vectorized and indexed in a vector database for later usage in an AI model (so only the relevant chunks of the input are sent to the LLM).
* `Document search` elements are also customizable with respect to their embeddings.

### Which are the models available?

Below a list of the embeddings models integrated into Stack AI's platform.

| MODEL                    | COMPANY     | DESCRIPTION                                                                                                                                                        | LINK                                                                                               |
| ------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
| `text-embedding-3-large` | OpenAI      | newest and most performant embedding models are now available, with lower costs, higher multilingual performance, and new parameters to control the overall size.  | [More Info](https://platform.openai.com/docs/guides/embeddings/embedding-models)                   |
| `text-embedding-3-small` | OpenAI      | Outperforms previous OpenAI's most capable model, Davinci, at most tasks, while being priced 99.8% lower                                                           | [More Info](https://platform.openai.com/docs/guides/embeddings/embedding-models)                   |
| `text-embedding-ada-002` | OpenAI      | Outperforms previous OpenAI's most capable model, Davinci, at most tasks, while being priced 99.8% lower                                                           | [More Info](https://platform.openai.com/docs/guides/embeddings/embedding-models)                   |
| `bert-base-cased`        | Google      | Embeddings based on Bidirectional Encoder Representations from Transformers (BERT)                                                                                 | [More Info](https://minigpt-4.github.io/)                                                          |
| `palm2`                  | Google      | Vertex AI PaLM API supports Gecko for Embeddings                                                                                                                   | [More Info](https://medium.com/google-cloud/generative-ai-getting-started-with-palm2-91a8354beeff) |
| `all-mpnet-base-v2`      | Open Source | Sentence-transformers model that maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search. | [More Info](https://huggingface.co/sentence-transformers/all-mpnet-base-v2)                        |


---

# 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.stackai.com/getting-started/core-ai-concepts/embeddings.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.
