Skip to main contentwatsonx Developer Hub

AutoAI RAG

Free token limit increased!
New 300k token limit for all new, free trials to use for LLM API calls and more. Sign up for free here.

Overview

The AutoAI RAG experiment class is responsible for creating experiments and scheduling training. All experiment results are stored in an instance of IBM Cloud Object Storage and can be fetched for further usage.

To schedule an AutoAI RAG experiment, call the run() method. This method triggers a training and optimization process on watsonx.ai. For more information, see Automating a RAG pattern with the AutoAI SDK.

Quickstart

Use the AutoAI Python SDK to automate and accelerate the design and deployment of an optimized, production-quality, retrieval augmented generation (RAG) pattern based on your data and use case. The following example Python code runs a RAG experiment.

Example

1run_details = rag_optimizer.run(
2    input_data_references=[input_data_connection],
3    test_data_references=[test_data_connection],
4    results_reference=results_connection,
5    background_mode=True
6)

Response

The code returns the status of the experiment, either running or completed.

1completed

Next steps

For additional information about the AutoAI RAG API, see the following links: