Skip to main content

About knowledge

OpenRAG includes a built-in OpenSearch instance that serves as the underlying datastore for your knowledge (documents). This specialized database is used to store and retrieve your documents and the associated vector data (embeddings).

The documents in your OpenSearch knowledge base provide specialized context in addition to the general knowledge available to the language model that you select when you install OpenRAG or edit a flow.

You can upload documents from a variety of sources to populate your knowledge base with unique content, such as your own company documents, research papers, or websites. Documents are processed through OpenRAG's knowledge ingestion flows with Docling.

Then, the OpenRAG Chat can run similarity searches against your OpenSearch knowledge base to retrieve relevant information and generate context-aware responses.

You can configure how documents are ingested and how the Chat interacts with your knowledge base.

OpenSearch authentication and document access

When you install OpenRAG, you provide the initial configuration values for your OpenRAG services, including authentication credentials for OpenSearch and optional OAuth connectors.

warning

Google is the only supported OAuth provider for OpenRAG.

Other OAuth credentials are used only to authorize cloud storage connectors.

The presence of Google OAuth credentials determines how OpenRAG authenticates with your deployment's OpenSearch knowledge base, and how it controls user access to documents in your knowledge base:

  • No-auth mode: If you don't provide Google OAuth credentials, then the OpenRAG OpenSearch knowledge base runs in no-auth mode. This mode uses one anonymous JWT token for OpenSearch authentication. There is no differentiation between users; all users that access your OpenRAG instance can access all documents uploaded to your knowledge base.

  • OAuth mode: If you provide Google OAuth credentials, then the OpenRAG OpenSearch knowledge base runs in OAuth mode. This mode uses a unique JWT token for each OpenRAG user, and each document is tagged with user ownership. Documents are filtered by user owner; users see only the documents that they uploaded or have access to through their cloud storage accounts.

tip

To enable OAuth mode, you must configure the Google Drive cloud storage connector for document ingestion. This is because OpenRAG uses Google OAuth credentials for both OAuth mode and the Google Drive cloud storage connector.

You can enable OAuth mode after initial setup by configuring the Google Drive connector.

OpenSearch index

An OpenSearch index is a collection of documents in an OpenSearch database.

By default, all documents you upload to your OpenRAG knowledge base are stored in an index named documents.

To change the OpenRAG index name, edit the OPENSEARCH_INDEX_NAME environment variable.

OpenSearch service port

You can access your OpenRAG OpenSearch dashboard directly at https://localhost:9200.

To change the port used by the OpenSearch service, edit the OPENSEARCH_PORT environment variable.

See also