OpenViSTAI · Agents · Blockchain · Crypto
Menu
RAG & Knowledge Systems

Openai Elasticsearch Rag

Openai Elasticsearch Rag is a self-hosted Python application that indexes long-form text in Elasticsearch using OpenAI-generated embeddings, retrieves relevant passages for questions, and uses OpenAI to generate answers.

Independent OpenViST project profile, based on linked sources.

Openai Elasticsearch Rag — OpenViST project profile in RAG & Knowledge Systems.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when building a self-hosted prototype or application workflow that needs to index long text and answer questions using retrieved passages.

Who it is for

  • Developers building a retrieval-augmented question-answering application over long-form text.
  • Teams wanting a local-server starting point that combines Elasticsearch vector retrieval with OpenAI embeddings and answer generation.

Documented uses

  • Submit text and an index name to the application's indexing endpoint.
  • Ask a question against an existing index through the query endpoint.
  • Use retrieved text passages as context for generated answers.
Before you choose

Requirements & limits

The README documents running the application as a local server on port 8081 and configuring OpenAI and Elasticsearch credentials in a .env file.

  • The documented prerequisites specify Python 3.9 or later and Elasticsearch 7.14.0.
  • The README's example Elasticsearch mapping uses a 1,536-dimension dense vector.
  • The application uses spaCy's en_core_web_sm model for NLP and sentence splitting.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up the local Q&A application

Prepare and start the application server locally.

Before you start

  • Python 3.9 or above, pip, and virtualenv
  • Elasticsearch 7.14.0
  • An OpenAI API key and Elasticsearch credentials
  • The en_core_web_sm spaCy model

Steps

  1. Create and activate a Python virtual environment.

  2. Install dependencies from requirements.txt and download the en_core_web_sm model.

  3. Download and start Elasticsearch.

  4. Create a .env file from .env-template and add the OpenAI API key and Elasticsearch credentials.

  5. Run python run.py; the README says the app starts on localhost port 8081.

Expected outcome

A local application server is started on localhost:8081.

Guide limitations

  • The README describes a localhost Hello response as a sanity check; indexing and querying are separate subsequent tasks.
Source-based practical guide

Index text and query it

Create an Elasticsearch index, submit text to the application, and send a question against that index.

Before you start

  • The local application and Elasticsearch are running.
  • The OpenAI API key and Elasticsearch credentials are configured.
  • curl is available.

Steps

  1. Create an Elasticsearch index with text and dense_vector fields; the README example sets the vector dimensions to 1536.

  2. POST a JSON payload containing text and the index name to localhost:8081/api/index.

  3. POST a JSON payload containing a question and the same index name to localhost:8081/api/query.

Expected outcome

The documented workflow submits text for indexing and requests a retrieval-backed answer to a question.

Guide limitations

  • The example index mapping specifies 1,536 vector dimensions.
  • The README gives example payloads but does not describe a separate response schema.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
18 October 2026
Original website title
ajeetsk/openai-elasticsearch-rag · Official homepage title · retained in its source language