# Snowflake Arctic Embed

> Snowflake's open family of retrieval-tuned text embedding models

- Category: Retrieval & Knowledge (RAG) / Embedding Models & Inference
- Language: Python
- Licence: Apache-2.0
- Repository: https://github.com/Snowflake-Labs/arctic-embed
- Website: https://www.snowflake.com/en/blog/introducing-snowflake-arctic-embed-snowflakes-state-of-the-art-text-embedding-family-of-models/
- Canonical page: https://ai-tldr.dev/tools/snowflake-arctic-embed/

## In short

Snowflake Arctic Embed is a family of open-source text embedding models built for retrieval. The models turn queries and documents into vectors so you can rank documents by relevance, which is the core building block of semantic search and retrieval-augmented generation (RAG) pipelines. It sits in the Embedding Models & Inference category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Python and licensed Apache-2.0.

## Overview

Snowflake Arctic Embed is a family of open-source text embedding models built for retrieval. The models turn queries and documents into vectors so you can rank documents by relevance, which is the core building block of semantic search and retrieval-augmented generation (RAG) pipelines.

The suite comes in several sizes, from a 22M-parameter xs model with 384 dimensions up to the 335M-parameter l model with 1024 dimensions, plus newer multilingual v2.0 variants. This range lets you trade off accuracy against latency and cost: the smaller models fit tight budgets, while the largest can stand in for closed-source embedding APIs.

It fits in the embedding-models category alongside other retrieval encoders. The models load through standard tooling such as Sentence Transformers, Hugging Face Transformers, and Transformers.js, so they drop into existing search and RAG stacks without a custom runtime.

## What it does

- Multiple model sizes (xs, s, m, m-long, l) covering 22M to 335M parameters and 384 to 1024 embedding dimensions
- Tuned for retrieval quality on the MTEB/BEIR benchmarks at each size profile
- Multilingual v2.0 variants (m-v2.0 and l-v2.0) for cross-language retrieval
- Loadable via Sentence Transformers, Hugging Face Transformers, and Transformers.js (JavaScript)
- Uses a query prefix and CLS-token pooling to improve search relevance
- Apache-2.0 licensed and published on Hugging Face for open use

## Getting started

The quickest path is the Sentence Transformers library, which loads a model by its Hugging Face ID and encodes text with a single call.

1. Install Sentence Transformers

   Install the library that wraps model loading and encoding.

```bash
pip install sentence-transformers
```

2. Embed queries and documents and rank by similarity

   Load a model, encode queries with the query prompt and documents without it, then score by dot product.

```python
import torch
from sentence_transformers import SentenceTransformer
from torch.nn.functional import normalize

# Model constant.
MODEL_ID = "Snowflake/snowflake-arctic-embed-m-v1.5"

# Your queries and docs.
queries = ['what is snowflake?', 'Where can I get the best tacos?']
documents = ['The Data Cloud!', 'Mexico City of Course!']

# Load the model.
model = SentenceTransformer(
    MODEL_ID, model_kwargs=dict(add_pooling_layer=False),
)

# Generate text embeddings.
query_embeddings = model.encode(queries, prompt_name="query")
document_embeddings = model.encode(documents)

# Scores via dotproduct.
scores = query_embeddings @ document_embeddings.T

# Pretty-print the results.
for query, query_scores in zip(queries, scores):
    doc_score_pairs = list(zip(documents, query_scores))
    doc_score_pairs = sorted(doc_score_pairs, key=lambda x: x[1], reverse=True)
    print(f'Query: "{query}"')
    for document, score in doc_score_pairs:
        print(f'Score: {score:.4f} | Document: "{document}"')
    print()
```

## When to use it

- Power semantic search over a document collection by ranking documents against a user query
- Build the retrieval step of a RAG pipeline that feeds relevant context to an LLM
- Run cross-language retrieval with the multilingual v2.0 models
- Replace a closed-source embedding API with a self-hosted, Apache-2.0 model to control cost and data
