Chapter 1. AutoRAG overview
AutoRAG is an automated optimization system in Red Hat OpenShift AI that finds the best retrieval-augmented generation (RAG) configuration for your documents and use case. You provide documents and test data. AutoRAG tests different RAG configurations, ranks results by evaluation metrics, and generates notebooks to run RAG patterns.
1.1. AutoRAG workflow Copy linkLink copied to clipboard!
When you create an AutoRAG optimization run, AutoRAG tests combinations of chunking, embedding, retrieval, and generation settings against your test data. Each combination produces a RAG pattern with evaluation scores. AutoRAG ranks patterns on a leaderboard and generates Jupyter notebooks that you can use to run the best pattern.
AutoRAG automatically samples up to 1 GiB of relevant documents based on your test data, so you do not need to filter your document set in advance. Documents referenced in your test data are prioritized during sampling.
1.2. AutoRAG terminology Copy linkLink copied to clipboard!
- RAG pattern
- An optimized RAG configuration that includes performance metrics, a leaderboard position, and indexing and inference notebooks.
- Search space
- The set of parameter combinations that AutoRAG tests during optimization. The search space includes chunking, embedding, retrieval, and generation settings.
1.3. Technology Preview limitations Copy linkLink copied to clipboard!
AutoRAG is a Technology Preview feature. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. For more information, see Technology Preview Features Support Scope.
The following limitations apply during Technology Preview:
- Only English language documents are supported.
- Remote vector databases only: Milvus and pgvector (PostgreSQL) are supported. Inline vector databases are not supported.
- A maximum of three foundation models and two embedding models per optimization run. Specifying more models can cause the run to fail.
- Images embedded in documents are not processed.
- Optical character recognition (OCR) is not available for PDF documents.
- Table structure detection is not available for PDF documents.
1.4. Viewing externally created runs Copy linkLink copied to clipboard!
The AutoRAG pipeline is automatically registered with your pipeline server when your pipeline server starts. If you create runs from the pipeline outside of the AutoRAG interface, the runs appear on the AutoRAG page in the dashboard.
To find the best RAG configuration for your documents, prepare test data, create an AutoRAG optimization run, evaluate the results, and run the best-performing pattern.
Before you begin, ensure that the following prerequisites are met:
-
A cluster administrator has set the values of the
spec.dashboardConfig.genAiStudioandspec.dashboardConfig.autoragdashboard configuration options totrue. For more information, see Dashboard configuration options. -
You have a pipeline server configured in your project. When configuring the pipeline server, select the Enable AutoML and AutoRAG pipelines checkbox in Advanced settings. If you create the
DataSciencePipelinesApplicationinstance with YAML, setspec.apiServer.managedPipelines: {}. For more information, see Configuring a pipeline server. - An OGX instance is available and configured with foundation and embedding models. For more information, see Working with OGX.
- A remote vector database is registered as a vector I/O provider with your OGX instance. Supported vector databases are Milvus and pgvector (PostgreSQL).
- Your documents are available in an S3-compatible storage bucket or locally for upload.
Upload the updated AutoRAG pipeline definition before you create your first run. For instructions and download links, see RHOAIENG-64768 - AutoML and AutoRAG pipeline runs fail with image pull errors in the release notes.