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

Rag Doc Qa

Rag Doc Qa is a Python application for building and running a document question-answering service. It ingests supported files and exports, indexes their chunks in Chroma or PostgreSQL with pgvector, and combines BM25 keyword search with dense vector retrieval. A query can return a citation-grounded answer through the CLI or a FastAPI streaming chat server.

Independent OpenViST project profile, based on linked sources.

Rag Doc Qa — 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 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.
Before you choose

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.

Source-based practical guide

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

  1. Clone the repository and change into its directory.

  2. Create and activate a Python virtual environment.

  3. Install the requirements.txt and requirements-dev.txt dependency files.

  4. 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.
Source-based practical guide

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

  1. Run rag-doc-qa ingest --source ./docs --profile local.

  2. Ask a question with rag-doc-qa query --question "What is the refund policy?" --top-k 6 --stream.

  3. 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.
Evidence and transparency

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