# RAG implementation failing

**URL:** https://discuss.elastic.co/t/rag-implementation-failing/366365
**Category:** Elastic Search
**Tags:** elastic-app-search
**Created:** [September 11, 2024, 3:09am UTC](https://discuss.elastic.co/t/rag-implementation-failing/366365 "2024-09-11T03:09:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Gordon1](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gordon1](https://discuss.elastic.co/u/Gordon1)
#### Post date: [September 11, 2024, 3:09am UTC](https://discuss.elastic.co/t/rag-implementation-failing/366365/1 "2024-09-11T03:09:12Z")

</div>

Hello, I am attempting to run the [Chatbot Tutorial] and when I attempt to run the "Flask Create-Index" Command on the Python Back End section, I get a error message stating:

"773 ERROR langchain\_elasticsearch.vectorstores: First error reason: Model [.elser\_model\_2] must be deployed to use. Please deploy with the start trained model deployment API."

I have configured my .env file with the correct parameters but I am still not able to connect. Can someone point me in the right direction before I try to present this to my management team?

Thank you,

([Welcome — Search Labs](https://www.elastic.co/search-labs/tutorials/chatbot-tutorial/welcome))

---

<div class="post-metadata">

### Author: ![ashishtiwari1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashishtiwari1993/32/135241_2.png) [@ashishtiwari1993](https://discuss.elastic.co/u/ashishtiwari1993)
#### Post date: [September 11, 2024, 6:10am UTC](https://discuss.elastic.co/t/rag-implementation-failing/366365/2 "2024-09-11T06:10:53Z")

</div>

Hi @Gordon1, Welcome to the Elastic community. It seems you have not deployed ELSER model (`.elser_mode_2`) in Elastic. To deploy -

Go to the kibana panel. Navigate to _ **Menu -\> Machine Learning** _ (In _Analytics_ section). In left menu, Click on _ **Trained Models** _ (In _Model Management_ Section).

1. ELSER can be found in the list of trained models.
2. Click the _ **Download model** _ button under _ **Actions** _.
3. After the download is finished, start the deployment by clicking the _ **Start deployment** _ button.
4. Provide a deployment ID, select the priority, and set the number of allocations and threads per allocation values (It's ok if you keep it as a default).
5. Click _ **Start** _.

Once started you can again try to run the same script.

---

<div class="post-metadata">

### Author: ![Gordon1](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gordon1](https://discuss.elastic.co/u/Gordon1)
#### Post date: [September 13, 2024, 3:23am UTC](https://discuss.elastic.co/t/rag-implementation-failing/366365/3 "2024-09-13T03:23:08Z")

</div>

Thank you very much! This worked!

---

<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: [October 11, 2024, 3:23am UTC](https://discuss.elastic.co/t/rag-implementation-failing/366365/4 "2024-10-11T03:23:28Z")

</div>

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