> ## Documentation Index
> Fetch the complete documentation index at: https://client-integrations-api-dev.sequen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Hosted RRI overview

> How your data scientists build and test ranking models on Sequen-hosted RRI, and how the results reach your own serving stack.

RRI is the Sequen platform where your scientists build and test ranking models. You give it your model code and your data. A team of agents then works on your code and trains models, and hands back the changes that improve the metrics you chose.

With hosted RRI, Sequen runs the platform and you keep ownership of the model code. You serve the models in your own stack, so there are no runtime calls to Sequen.

## Choose how you run models

| | Ranking API | Hosted RRI, your serving |
| - | - | - |
| Models built by | Sequen | Your scientists, in RRI |
| Models served by | Sequen | Your serving stack |
| Runtime calls to Sequen | Ranking API, Events API | None |
| Daily batch data feed | Required | Required |
| GitHub connection | Not needed | Required |
| Single sign-on | Not needed | Optional |

This section covers **Hosted RRI, your serving**. A third option, hosted RRI with Sequen serving, is planned: your scientists would build models in RRI and Sequen would serve them. These pages will say more when it is available.

## The workflow

**1. Send training data**

Your catalog, events, impressions and orders reach Sequen as a daily batch feed. See [Training data](https://client-integrations-api-dev.sequen.ai/rri/training-data.md).

**2. Connect your repository**

You point RRI at the repository that holds your model code. See [Connecting repositories](https://client-integrations-api-dev.sequen.ai/rri/connecting-repositories.md).

**3. Build and test**

Your scientists start a session with an objective. Agents read your code, form hypotheses, edit the configuration or the code, train, and read the metrics your training code reports. See [What happens in a session](#what-happens-in-a-session).

**4. Publish**

When an experiment beats the baseline, you productionize it. RRI opens a pull request on your repository with the code and configuration change. Trained artifacts are published separately. See [Artifacts and getting models into production](https://client-integrations-api-dev.sequen.ai/rri/artifacts-and-serving.md).

**5. Deploy**

You review and merge the pull request, then train and serve the model with your own pipeline.

## What happens in a session

A session is one piece of research: a team of agents given your model code, your data and an objective, left to run experiments until the objective is met, the time limit is reached, or you stop it.

**Before anything runs.** Sequen reserves a workspace, places your model code in it as a git repository with full history, writes the Model Class's default configuration into it, and pins the dataset you chose. Nothing of yours runs during this. If a step fails, the session stops there and says which step it was.

**While it runs.** The agents read your README first, then the code, and edit them in the workspace. Each time they run an experiment, Sequen runs your entry point on a GPU machine with the dataset staged. Each attempt is an **experiment**, recorded with the exact commit it ran, the configuration it used and every metric it produced. The session page shows experiments as they are created, live training curves, and the agents' own reasoning. You can send a message into a running session and the agents take it into account.

**What you are left with.**

* **Experiments**, each with its metrics, configuration and commit, comparable against the Model Class's baseline and against each other.
* **A knowledge base** the agents wrote as they went: what they tried, what it did and what they concluded. It carries forward into later sessions on the same use case.
* **A branch per experiment** in Sequen's managed copy of your repository.

**Cost.** Two things: the compute the session uses, with GPU time only while an experiment run is training, and the model calls the agents make. Both are bounded by the limits set when the session starts, and the session page reports spend as it accrues.

## What stays yours

* **Your code.** Sequen never pushes to a default branch and never merges anything. Every change arrives as a pull request that goes through your review and CI.
* **Your access.** Sequen can reach only the repositories you install the GitHub App on.
* **Your serving.** Sequen does not deploy to your infrastructure.

## In this section

> [card] [Connecting repositories](https://client-integrations-api-dev.sequen.ai/rri/connecting-repositories.md)
>
> Grant access to your code, point a Model Class at it, and get changes back as pull requests.

> [card] [Training data](https://client-integrations-api-dev.sequen.ai/rri/training-data.md)
>
> The daily batch feed, and how a dataset is pinned to a session.

> [card] [Artifacts and getting models into production](https://client-integrations-api-dev.sequen.ai/rri/artifacts-and-serving.md)
>
> What a session publishes and how to take it into your own serving stack.

> [card] [Model support](https://client-integrations-api-dev.sequen.ai/rri/model-support.md)
>
> What your model code must provide, and the boundaries of the training environment.

> [card] [Single sign-on](https://client-integrations-api-dev.sequen.ai/rri/sso.md)
>
> Sign in with your company accounts.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.