Chapter 5. Run the RAG pattern
After you select a RAG pattern from the AutoRAG leaderboard, run the notebooks in an OpenShift AI workbench to use the pattern with your documents.
Prerequisites
- You have selected a RAG pattern from a completed AutoRAG optimization run. For more information, see Evaluate AutoRAG results.
- You have downloaded the indexing and inference notebooks from the AutoRAG leaderboard or pattern details view.
- You have a running workbench in your OpenShift AI project.
- You have the connection details for your S3-compatible object storage and your OGX instance.
- The models used in your selected RAG pattern are available on your OGX instance.
Procedure
- In the OpenShift AI dashboard, open your workbench.
Attach the following data connections to the workbench. Use the same S3 bucket and OGX instance that you used for the optimization run.
- An S3-compatible object storage connection for your documents
- A connection for your OGX instance that includes the API key and base URL
Optional: To index additional documents, upload and run the indexing notebook.
The vector database is already populated from the optimization run.
- Upload the inference notebook to the workbench.
Open the inference notebook and run each cell.
The notebook prompts you to enter a question. Enter a question to verify that the RAG system returns relevant answers from your documents.
Verification
- If you ran the indexing notebook, verify that all cells completed without errors.
- The inference notebook returns answers grounded in your documents.
- If the notebook displays an error, check your connection details.