# Text embedding

**URL:** <https://discuss.elastic.co/t/text-embedding/368154>\
**Category:** Kibana\
**Created:** [October 3, 2024, 12:36am UTC](https://discuss.elastic.co/t/text-embedding/368154 "2024-10-03T00:36:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amphagory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amphagory/32/46127_2.png) [@Amphagory](https://discuss.elastic.co/u/Amphagory)\
**Post date:** [October 3, 2024, 12:36am UTC](https://discuss.elastic.co/t/text-embedding/368154/1 "2024-10-03T00:36:30Z")

</div>

I was wondering if it was possible to create a text embedding pipeline where I would have a list of text (i.e. [“text1”, “text2”, “text3”, …]) and the output would be a list of its individual embedding (i.e. [[embedded vectors1], [embedded vectors2], [embedded vectors3], etc...]).

NOTE: The list of text will be of variable length for each document.

If not, can someone suggest alternatives?

M.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [October 3, 2024, 10:54am UTC](https://discuss.elastic.co/t/text-embedding/368154/2 "2024-10-03T10:54:04Z")

</div>

Hi @Amphagory,

Welcome back! Are you wanting to generate an embedding using a pre-loaded model in Elastic? It's not something I've tried, but I believe it could be done using a [`for_each` processor](https://www.elastic.co/guide/en/elasticsearch/reference/current/foreach-processor.html#foreach-array-ex) invoking an [`inference` processor](https://www.elastic.co/guide/en/elasticsearch/reference/current/inference-processor.html). I'm not sure how well it will scale so it might be worth testing out on a small subset first.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![Amphagory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amphagory/32/46127_2.png) [@Amphagory](https://discuss.elastic.co/u/Amphagory)\
**Post date:** [October 3, 2024, 1:02pm UTC](https://discuss.elastic.co/t/text-embedding/368154/3 "2024-10-03T13:02:34Z")

</div>

Hello!

I think you hit it on the nail. I would rather use a pre-loaded model in Elastic, but open to other solutions.

I'll look into the two processors you speak of and try to add that into my ingestion pipeline processor to see if it works.

Mike
