Practical overview
When it fits
Use it when you need a self-hosted document Q&A workflow that combines keyword and vector retrieval and returns references to the supporting document chunks.
Who it is for
- Teams building a question-answering service over internal documentation.
- Developers who want to index supported document formats and query them with source references.
- Operators choosing between a local Chroma index and a PostgreSQL pgvector backend.
Documented uses
- Ingest a folder of documents into a searchable index.
- Ask a question over the indexed corpus and receive an answer with source references.
- Serve streamed chat responses through the bundled UI.
- Evaluate retrieval and answer quality with the included Ragas command.
Requirements & limits
- Python 3.11 or later is required.
- The README's installation instructions require an OpenAI API key at minimum; it also documents local sentence-transformers embeddings.
- The pgvector option requires PostgreSQL 15 or later and the vector extension.
- The repository lists an MIT license.
- The project includes separate CLI commands for ingestion, querying, serving, evaluation and benchmarking.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Rag Doc Qa and prepare its environment
Set up the Python project environment and configure its minimum documented API credential.
Before you start
- Python 3.11 or later
- An OpenAI API key
Steps
Clone the repository and change into its directory.
Create and activate a Python virtual environment.
Install the requirements.txt and requirements-dev.txt dependency files.
Copy .env.example to .env and add OPENAI_API_KEY.
Expected outcome
The project dependencies are installed in a virtual environment and the documented minimum API key is configured.
Guide limitations
- This setup sequence does not cover indexing documents or running the service.
- For the pgvector backend, PostgreSQL 15 or later with the vector extension is additionally required.
Index a document folder and ask a question
Ingest a local folder with the local profile, then query its indexed content.
Before you start
- The project environment and API key configured as described in the repository installation instructions
- A document folder, such as ./docs
Steps
Run
rag-doc-qa ingest --source ./docs --profile local.Ask a question with
rag-doc-qa query --question "What is the refund policy?" --top-k 6 --stream.Review the streamed answer and its source references.
Expected outcome
The CLI returns an answer over the indexed corpus with citations to source document chunks.
Guide limitations
- The example assumes an existing ./docs folder.
- The documented setup requires an OpenAI API key at minimum.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- tainguyen07/rag-doc-qa · Official homepage title · retained in its source language

