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.
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.
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
Create and activate a Python virtual environment.
Install dependencies from requirements.txt and download the en_core_web_sm model.
Download and start Elasticsearch.
Create a .env file from .env-template and add the OpenAI API key and Elasticsearch credentials.
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.
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
Create an Elasticsearch index with text and dense_vector fields; the README example sets the vector dimensions to 1536.
POST a JSON payload containing text and the index name to localhost:8081/api/index.
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.
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

