# Can ELSER be used with languages other than English

**URL:** <https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [January 16, 2024, 4:18pm UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186 "2024-01-16T16:18:53Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [January 16, 2024, 4:18pm UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/1 "2024-01-16T16:18:53Z")

</div>

Hello,

I'm posting to gather insights about ELSER's language capabilities, particularly its support for languages other than English. My interest lies in understanding how well ELSER handles the following languages:

- Dutch (NL)
- French (FR)
- German (DE)

If ELSER is currently not equipped to support these languages, I'd be curious to learn about any future plans. Specifically, are there any timelines or stages in development aimed at integrating Dutch, French, and German (a roadmap would be ideal) ?

Insights into the challenges and strategies for adapting ELSER to these languages would be highly appreciated.

On the other hand, if ELSER already boasts multilingual support, I'd love to know more about its performance. How does it fare in terms of accuracy and relevance when processing Dutch, French, and German compared to English? I'm keen on understanding any particular strengths or limitations ELSER might exhibit in these languages.

Thanks,  
Chenko Mortier

---

<div class="post-metadata">

**Author:** ![camillo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/camillo/32/130970_2.png) [@camillo](https://discuss.elastic.co/u/camillo)\
**Post date:** [January 21, 2024, 3:44pm UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/2 "2024-01-21T15:44:57Z")

</div>

I second this and am interested in the performance in for Italian (IT), as far as I've seen ELSER is english only and the E5 model should be used instead, however, I can only find ELSER in my trained model console

---

<div class="post-metadata">

**Author:** ![valeriy42](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/valeriy42/32/82758_2.png) [@valeriy42](https://discuss.elastic.co/u/valeriy42)\
**Post date:** [January 22, 2024, 9:39am UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/3 "2024-01-22T09:39:22Z")

</div>

Hello,

indeed, ELSER should be used for English documents, while for other languages we recommend using multilingual e5. Note, that starting with 8.12 [we support `multilingual-e5-small` as a first-class citizen](https://www.elastic.co/guide/en/kibana/current/whats-new.html#_first_class_support_for_e5_multilingual_embeddings).

---

<div class="post-metadata">

**Author:** ![camillo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/camillo/32/130970_2.png) [@camillo](https://discuss.elastic.co/u/camillo)\
**Post date:** [January 22, 2024, 9:56am UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/4 "2024-01-22T09:56:37Z")

</div>

Thank you, I can't find the E3 model in my trained models but I can find the Elser model, what could be the problem?

---

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [January 22, 2024, 1:47pm UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/5 "2024-01-22T13:47:48Z")

</div>

> [@camillo](#):
>
> Thank you, I can't find the E3 model in my trained models but I can find the Elser model, what could be the problem?

Hello, I can see the E5 model (not the E3) when I check my local dev env with elastic 8.12. It seems only E5 is supported. You can import the E3 model with eland, that should work ?

---

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [January 22, 2024, 1:49pm UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/6 "2024-01-22T13:49:53Z")

</div>

> [@valeriy42](#):
>
> indeed, ELSER should be used for English documents, while for other languages we recommend using multilingual e5. Note, that starting with 8.12 [we support `multilingual-e5-small` as a first-class citizen](https://www.elastic.co/guide/en/kibana/current/whats-new.html#_first_class_support_for_e5_multilingual_embeddings).

Thanks for your response. Do you have any more information on how this compares with ELSER ?

Also, will future versions allow better models ? (Since I see this model has "-small" , making me think it is not the best)

---

<div class="post-metadata">

**Author:** ![camillo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/camillo/32/130970_2.png) [@camillo](https://discuss.elastic.co/u/camillo)\
**Post date:** [January 22, 2024, 2:01pm UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/7 "2024-01-22T14:01:21Z")

</div>

yea sorry I misspelled it, I meant the E5 model, I can only see two versions of elser and the language detection model, maybe it's because I'm on elastic 8.11 ? I run in an Elastic Cloud hosted deployment

---

<div class="post-metadata">

**Author:** ![Chenko](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@Chenko](https://discuss.elastic.co/u/Chenko)\
**Post date:** [January 22, 2024, 2:13pm UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/8 "2024-01-22T14:13:49Z")

</div>

> [@camillo](#):
>
> yea sorry I misspelled it, I meant the E5 model, I can only see two versions of elser and the language detection model, maybe it's because I'm on elastic 8.11 ? I run in an Elastic Cloud hosted deployment

Hello, Yes it seems to be introduced in the recently released 8.12.0. I suggest upgrading so you can use it without using eland.

---

<div class="post-metadata">

**Author:** ![JdKock](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jdkock/32/26327_2.png) [@JdKock](https://discuss.elastic.co/u/JdKock)\
**Post date:** [January 25, 2024, 6:07am UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/9 "2024-01-25T06:07:21Z")

</div>

I'm very interested in this multilingual-e5 model and want to try it out. But what field type do I add to my index template for the embedding?

I now tried the following:

```auto
 "content_embedding": { 
	"type": "dense_vector", 
	"dims": 3, 
	"element_type": "byte",
	"similarity": "dot_product" 
}

```

But when I'm try to reindex I get the following error:

failed to parse: element\_type [byte] vectors only support non-decimal values but found decimal value [0.058786135] at dim [0]

---

<div class="post-metadata">

**Author:** ![dkyle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dkyle/32/59114_2.png) [@dkyle](https://discuss.elastic.co/u/dkyle)\
**Post date:** [January 25, 2024, 11:32am UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/10 "2024-01-25T11:32:03Z")

</div>

Element type should be float rather than byte as the model produces a float embedding. Set dims to the size of the text embedding, for multilingual-e5-small that is 384

```auto
"dims": 384
"element_type": "float",

```

---

<div class="post-metadata">

**Author:** ![JdKock](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jdkock/32/26327_2.png) [@JdKock](https://discuss.elastic.co/u/JdKock)\
**Post date:** [January 25, 2024, 12:36pm UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/11 "2024-01-25T12:36:42Z")

</div>

Thanks that helped. Now I can reindex everything.

And what about searching now, can I just use the following like I did with ELSER:

```auto
{
	"text_expansion": {
		"content_embedding": {
			"model_text": "just a simple search query",
			"model_id": ".multilingual-e5-small_linux-x86_64",
			"boost": 1
		}
	}
}

```

---

<div class="post-metadata">

**Author:** ![dkyle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dkyle/32/59114_2.png) [@dkyle](https://discuss.elastic.co/u/dkyle)\
**Post date:** [January 25, 2024, 1:02pm UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/12 "2024-01-25T13:02:19Z")

</div>

For text embeddings use knn search

There's an example [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/semantic-search.html#semantic-search-search) - click on Dense Vector Models

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 22, 2024, 1:02pm UTC](https://discuss.elastic.co/t/can-elser-be-used-with-languages-other-than-english/351186/13 "2024-02-22T13:02:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
