Blog

Get set, build: Red Hat OpenShift AI applications powered by Elasticsearch vector database

Learn how to use Elasticsearch with the ‘AI Generation’ Validated Pattern to rapidly deploy secure, GitOps-driven RAG applications on Red Hat OpenShift.

Red Hat validated pattern frameworks use GitOps for seamless provisioning of all operators and applications on Red Hat OpenShift. The Elasticsearch vector database is now officially supported by The ‘AI Generation with LLM and RAG’ Validated Pattern. This allows developers to jumpstart their app development using Elastic's vector database for retrieval-augmented generation (RAG) applications on OpenShift, combining the benefits of Red Hat's container platform with Elastic's vector search capabilities.

Getting started with Elastic in the validated pattern

Let's walk through setting up the pattern with Elasticsearch as your vector database:

Prerequisites

  • Podman installed on your local system

  • An OpenShift cluster running in AWS

  • Your OpenShift pull secret

  • OpenShift CLI (oc) installed

  • An installation configuration file

Step 1: Fork the repository

Create a fork of the rag-llm-gitops repository.

Step 2: Clone the forked repository

Clone your forked repository and go to the root directory of the repository.

git clone git@github.com:your-username/rag-llm-gitops.git 
cd rag-llm-gitops

Step 3: Configure and deploy

Create a local copy of the secret values file:

cp values-secret.yaml.template ~/values-secret-rag-llm-gitops.yaml

Configure the pattern to use Elasticsearch by editing the values-global.yaml file:

# Open the file in your favorite editor
vi values-global.yaml

# Look for the 'db' section under 'global':
# global:
#   db:
#     type: DEFAULT_VALUE

# Change the db.type from "EDB" (default) or "REDIS" to "ELASTIC"

IF NECESSARY: Configure AWS settings (if your cluster is in an unsupported region):

mkdir -p ~/.aws
echo -e "[default]\nregion = <your-region>" > ~/.aws/config

Add GPU nodes to your cluster:

./pattern.sh make create-gpu-machineset

Install the pattern:

./pattern.sh make install

The installation process automatically deploys:

  • Pattern operator components

  • HashiCorp Vault for secrets management

  • Elasticsearch operator and cluster

  • RAG application UI and backend

Step 4: Verify deployment

After installation completes, check that all components are running.

In the OpenShift web console, go to the Workloads > Pods menu. Select the rag-llm project from the drop-down.

The following pods should be up and running:

Verifying deployment in the OpenShift web console.

Alternatively, you can check via the CLI:

oc get pods -n rag-llm

You should see pods including:

  • elastic-operator - The Elasticsearch operator

  • es-vectordb-es-default-0 - The Elasticsearch cluster

  • ui-multiprovider-rag-redis - The RAG application UI (despite the name, it uses the configured database type, which in our case is Elastic)

Step 5: Try out the application

Navigate to the UI in your browser to start generating content with your RAG application backed by Elasticsearch.

From any page of your OpenShift console, click on the Application Menu and select the application:

Trying out the RAG application in the OpenShift console.

Then:

  • Select your configured LLM provider, or configure your own

    • When configuring with OpenAI, the application appends the appropriate endpoint. So, in the ‘URL’ field, provide ‘https://api.openai.com/v1’ rather than ‘https://api.openai.com/v1/chat/completions’

  • Enter the ‘Product’ as ‘RedHat OpenShift AI’

  • Click “Generate”

  • Watch as the Proposal is created for you in real-time

Creating a product proposal in RedHat OpenShift AI.

So what just happened?

When you deploy the pattern with Elasticsearch, here's what happens behind the scenes:

  1. The Elasticsearch operator is deployed to manage Elasticsearch resources

  2. An Elasticsearch cluster is provisioned with vector search capabilities

  3. Sample data is processed and stored as vector embeddings in Elasticsearch

  4. The RAG application is configured to connect to Elasticsearch for retrieval

  5. When you generate content, the application queries Elasticsearch to find relevant context for the LLM

Deploying the validated pattern with Elasticsearch for RAG.

What's next?

This initial integration showcases just the beginning of what's possible when you combine Elasticsearch vector search with OpenShift AI. Elastic brings rich information retrieval capabilities that make it ideal for production RAG applications, and we are considering the following for future enhancement:

  • Advanced semantic understanding - Utilize Elastic's ELSER model for more accurate retrieval without fine-tuning

  • Intelligent data processing using Elastic's native text chunking and preprocessing capabilities

  • Hybrid search superiority - Combine vector embeddings with traditional keyword search and BM25 ranking for the most relevant results

  • Production-ready monitoring - Leverage Elastic's comprehensive observability stack to monitor RAG application performance and gain insights into LLM usage patterns

We welcome feedback and contributions as we continue to bring powerful vector search capabilities to OpenShift AI applications! If you are at Red Hat Summit 2025, stop by Booth #1552 to learn more about Elastic!

Resources:

https://validatedpatterns.io/patterns/rag-llm-gitops/

https://validatedpatterns.io/patterns/rag-llm-gitops/deploying-different-db/

Conteúdo relacionado

LINQ para Elasticsearch ES|QL: escreva Consultas em C# e Consulte o Elasticsearch

Florian Bernd

Aprimorando as capacidades de chatbots com PNL e busca vetorial no Elasticsearch.

Priscilla Parodi

Elasticsearch x OpenSearch: comparação de desempenho da busca vetorial

Ugo Sangiorgi

Detecção de plágio por IA: usando o Elasticsearch

Priscilla Parodi

Técnicas avançadas de RAG, parte 2: Consultas e testes

Han Xiang Choong

Pronto para criar buscas de última geração?

Uma pesquisa suficientemente avançada não se consegue apenas com o esforço de uma só pessoa. O Elasticsearch é impulsionado por cientistas de dados, especialistas em operações de aprendizado de máquina, engenheiros e muitos outros que são tão apaixonados por buscas quanto você. Vamos nos conectar e trabalhar juntos para construir a experiência de busca mágica que lhe trará os resultados desejados.

Experimente você mesmo(a)