---
title: "Set up DocLake's model connection"
description: "Register endpoints and API keys under Set Up Model Sources, then assign a model to each of the four uses — language, embedding, OCR, and enhance — under Set Up Models"
canonical_url: "https://docs.ardge.com/en/knowledge/doclake/model-connection"
---
# Set up DocLake's model connection

> Register endpoints and API keys under Set Up Model Sources, then assign a model to each of the four uses — language, embedding, OCR, and enhance — under Set Up Models

## Overview

DocLake doesn't include any models of its own. AI answers, document indexing, search, and file recognition are all handled by external models. These models usually run in AI Model Center on the same ARX.

The **Model Connection** page has two tabs:

- **(1) Set Up Model Sources**: register the services that provide models. Each source has a **Connection Name**, an **Endpoint**, and an **API Key**. You can register several
- **(2) Set Up Models**: pick one model for each of the four uses from the registered sources

The first time DocLake starts, it creates a model source named `Default LLM Provider` that points to the ARX model service, and fills in the four uses from the models in AI Model Center. On ARX, you usually only need to check that the settings are right.

## What you'll learn

- Tell apart the four models DocLake uses — language, embedding, OCR, and enhance
- Confirm in AI Model Center that the models are running
- Check or add a model source
- Assign a model to each of the four uses, and understand what changing the embedding model does

**Estimated time: about 10 minutes**

## Applies to

- DocLake 1.0.0 and later

## Before you begin

- Your account is a built-in **Admin**, or your role has **RW** permission on the **Model Connection** page
- A language model, an embedding model, and an OCR model are deployed in AI Model Center on the same ARX. If you're not sure which to pick, start with the recommended model set offered in App Market

## The four models DocLake uses

| Model | What it does | Required |
| --- | --- | --- |
| **Language Model** | Answers questions | Required |
| **Embedding Model** | Converts documents and queries into vectors for indexing and search | Required |
| **OCR Model** | Vision model that recognizes text block by block when importing PDF, Office, and image files | Required |
| **Enhance Model** | Vision model that corrects recognized text. When filled in automatically, it defaults to the same model as the language model | Required |

All four uses must have a model, and you can't clear any of them back to unselected. While any use is unassigned, DocLake shows **Models Not Ready** and "**Required models are not set up. Go to Model Connection to finish setting them up.**" at the top of the page, and neither search nor AI Q&A works.

## Step 1: Confirm in AI Model Center that the models are running

1. Open **AI Model Center** on the same ARX and go to the **Model Instances** page
2. Check that every model you plan to use shows **Running**

![Model instances in AI Model Center, with every model DocLake uses running](https://docs.ardge.com/screenshots/knowledge/en/doclake/model-connection/step-1.webp)

<warning>

**Search and Q&A fail while a model is still downloading or isn't running:**

If DocLake can't find an assigned model on its source, the page shows "**The configured model was not found on the model source. It may still be loading. Check its status in ARX AI Model Center.**" Start that model in AI Model Center first.

</warning>

## Step 2: Check or add a model source

1. Go to the **Admin Center**, then **AI** → **Model Connection**
2. Switch to the **(1) Set Up Model Sources** tab
3. In the **Model connections** list on the left, click the source to check. Its **Connection Name**, **Endpoint**, and **API Key** appear on the right

When DocLake runs on ARX, the list has one entry named `Default LLM Provider`. Just check that its **Endpoint** has a value — you don't need to change it.

To add another model service that offers an OpenAI-compatible API:

1. Click **Add Connection**
2. Fill in the fields as shown below
3. Click **Save**

| Field | Value | Rules and notes |
| --- | --- | --- |
| **Connection Name** | A name that identifies this source, for example `My API gateway` | Required, up to 64 characters. It can't match an existing source's name, even if only the case differs |
| **Endpoint** | The model service's API URL, for example `https://api.example.com/v1` | Required. Only `http://` or `https://` is accepted. Before saving, DocLake fetches the model list from the endpoint, and it won't save if that fails |
| **API Key** | The API key the service issued | Optional. When you edit an existing source, leaving it blank keeps the current API key |

![The Set Up Model Sources tab with Default LLM Provider selected](https://docs.ardge.com/screenshots/knowledge/en/doclake/model-connection/step-2.webp)

<note>

**Change the models before you delete a model source:**

While any use relies on a model from a source, you can't delete that source. The page shows "**Unable to delete "name": models from this connection are used by use. Change the model in "(2) Set Up Models" first.**"

</note>

## Step 3: Assign a model to each of the four uses

1. Switch to the **(2) Set Up Models** tab
2. In each of the four dropdowns — **Language Model**, **Embedding Model**, **OCR Model**, and **Enhance Model** — choose the model to use. Options are grouped by model source, and you can type a keyword in **Search models**. Once chosen, the field shows "source name / model name"
3. Click **Save**

On success, the page shows "**Saved**".

![The Set Up Models tab with the four model dropdowns](https://docs.ardge.com/screenshots/knowledge/en/doclake/model-connection/step-3-1.webp)

<warning>

**Changing the embedding model reindexes every library:**

When you change the **Embedding Model** and save, the **Change Embedding Model** dialog appears first: "**All libraries will be reindexed automatically after this change. Search and AI Q&A will be unavailable until indexing is complete. Are you sure you want to change it?**" Once you click **Confirm Change**, every library starts reindexing.

The more libraries and files you have, the longer reindexing takes. Settle on the embedding model before you create your first library, or change it outside busy hours.

</warning>

## What happens after you change a model?

The embedding model turns documents and search queries into vectors, and DocLake compares how close they are. Vectors from different models can't be compared with each other, so only a change of embedding model requires regenerating the vectors for every document.

| Change | Reindex? |
| --- | --- |
| Change the **Embedding Model** | Every library is reindexed automatically |
| Change the **Language Model** | Not needed — the next answer uses the new model |
| Change the **OCR Model** or **Enhance Model** | Not reindexed automatically. The new model applies only to files processed afterwards |
| Change only a source's **Endpoint** or **API Key**, with the same models | Not needed |

Reindexing after an embedding model change:

- Recalculates vectors with the new model only. It doesn't reread or re-recognize files, so it's faster than the first indexing
- Doesn't appear on a library's **Index Tasks** tab
- Until it finishes, users see "**Libraries are being reindexed. Search is unavailable until reindexing is complete.**" when they search and "**Libraries are being reindexed. AI answers are unavailable until reindexing is complete.**" in AI Q&A. Neither **Fuzzy Search** nor **Keyword Search** works
- It's done when searching any library in **Search** no longer shows these messages

## Troubleshooting

| Message | Likely cause | What to do |
| --- | --- | --- |
| `Models Not Ready` | One of the four uses has no model assigned | Fill in all four uses on **(2) Set Up Models** |
| `Couldn’t load models from: <names>. Check them on the "(1) Set Up Model Sources" tab.` | The source can't be reached right now, or its API key is wrong | Go back to **(1) Set Up Model Sources** and check its **Endpoint** and **API Key** |
| `Couldn’t get the model list from a selected connection. Check it on the "(1) Set Up Model Sources" tab.` | A selected source didn't respond when you saved the model assignments | Same as above |
| `Couldn’t get the model list from this endpoint. Check the URL.` | The **Endpoint** can't be reached when you add or edit a source | Check that the URL is correct and includes `http://` or `https://` |
| `This endpoint rejected the API Key. Check that the key is correct.` | The **API Key** is wrong or has expired | Get a new key from the service |
| `This connection name is already in use.` | The **Connection Name** matches an existing source | Choose a different name |
| `Enter a valid URL (e.g. https://api.example.com/v1).` | The **Endpoint** isn't a valid URL | Add the protocol and the full path |
| `Failed to save. Please try again later.` when changing the **Embedding Model** | The new model outputs vectors of a different length from the current one, which DocLake doesn't accept | Choose an embedding model with the same vector length as the current one |

## Next steps

With the model connection set up, you can create your first library — see [Create your first library](https://docs.ardge.com/en/knowledge/doclake/first-library).

## Related articles

- [Reindex and cancel indexing](https://docs.ardge.com/en/knowledge/doclake/indexing/resync)
- [Call on-premises models on ARX through the API](https://docs.ardge.com/en/knowledge/arx-os/api-model-calls)


## Sitemap

See the full [sitemap](https://docs.ardge.com/sitemap.md) for all pages.
