> ## Documentation Index
> Fetch the complete documentation index at: https://labs.laer.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Epiq AI integration

## TAR Integration with Epiq Discovery

### 1. Collection Types & Logic

We have introduced a specialized collection type designed to streamline how Epiq Discovery handles Active Learning (TAR).

| **Collection Type** | **TAR Access** | **Chat Access** | **Workflow/GenAI Access** | **Use Case**                                                                              |
| ------------------- | -------------- | --------------- | ------------------------- | ----------------------------------------------------------------------------------------- |
| `tar_only`          | Yes            | No              | No                        | Documents used strictly for training TAR models; excluded from Chat.                      |
| `discovery`         | Yes            | Yes             | No                        | Documents available for TAR and Chat, but restricted from text generation/classification. |
| `review`            | Yes            | Yes             | Yes                       | The full-access tier for all model types and workflows.                                   |

#### Integration Strategy

To maintain simplicity, users should upload documents to a single collection per project based on their maximum required utility:

* TAR Only: Use `tar_only`.
* TAR + Chat: Use `discovery`.
* Any other model type: Upgrade the collection to `review`.

> Note: Do not create separate collections to categorize documents for the same project. If a user needs to Chat over a specific subset of documents within a collection, they should use Datasets as the filtering mechanism rather than collection boundaries.

***

### 2. Predictive Coding Model

A new `model_type` has been introduced specifically for the TAR (Technology Assisted Review) use case.

#### Model Specification: `predictive_coding`

* Purpose: TAR model for document ranking and continuous active learning.
* Constraints: Unlike standard LLM models, `predictive_coding` models do not have access to `instructions` or `examples` parameters. They are used strictly for the TAR scoring engine.

***

### 3. Billing Model

Billing is calculated based on three distinct tiers of usage:

1. Basic Storage: A flat rate for all documents stored within any collection type.
2. Chat Enablement: Billed if the collection type allows Chat (e.g.,  `review` , or `discovery`). Chat has access to all documents except documents in the `tar_only` collection.
3. Workflow & Models: Billed on a per-document basis. This applies to any document processed through a workflow or a non-TAR model (e.g., text classification).&#x20;

***

### 4. API Example

When initializing a collection via the API for an Epiq Discovery project intended for TAR:

JSON

```
POST /api/v1/cases/{case_id}/sources
​{​
  "name": "Epiq Discovery TAR",​
  "description": "",​
  "source_type": "tar_only"
​}
```

Creating a TAR model:

JSON

```
POST /api/v1/cases/{case_id}/models
​{​
  "name": "TAR model",​
  "description": "",​
  "model_type": "predictive_coding",​
  "positive_labels": [​
    "responsive"​
  ],​
  "negative_labels": [​
    "not_responsive"​
  ],
​}
```

Get a list of TAR models

```
GET /api/v1/cases/{case_id}/models?model_type=predictive_coding
```

### 5. SSO Redirect

Inside Epiq Discovery, a deep linking to EAIDA should use the following format:

```
https://{aida_domain}/api/v1/auth/start?account_id={account_id}&returnTo=/projects/{case_id}/models/{model_id}
```
