## Create and Manage Search Profiles

These instructions apply to the current Admin Console.

Create a Search Profile when you know which records should answer a class of questions and what information those records contain.

### Find Search Profiles

In the left sidebar, under **Connect**, select **AI Search**. The **Search Profiles** list shows **ID**, **Name**, **Object Type**, **Model**, **Dimensions**, and **Status** for each profile. Search by profile ID, use **Filters** and **Columns**, and use a row’s actions menu (⋮) to **Copy identifier** or **Delete**. Select a profile to open it.

### The Search Profile Page

A profile page has a status card at the top and three tabs below it:

| **Area**              | **What it shows**                                                                                                                                                                                                                                                                                        |
|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Status card           | The source Object Type (with a link to it), the index status (**Indexing** or **Ready**), model and dimensions, the active generation ID, **Matching records**, **Record errors**, build progress, and **Technical details**. See [Keep Search Up to Date](https://docs.contextual.io/connect/ai-search/keep-search-up-to-date.md#read-index-status). |
| **Query** tab         | Run test searches against a named index and inspect the results. See [Query and Use Results](https://docs.contextual.io/connect/ai-search/query-and-use-results.md#test-a-query-in-the-console).                                                                                                                                                      |
| **Indexes** tab       | Add, edit, reorder, and remove named Search Indexes.                                                                                                                                                                                                                                                     |
| **Configuration** tab | **Projection columns** summary, then the profile’s Identity, Source, Template, Chunking, Embedding, and Projections settings. **Edit with SolutionAI** is available here.                                                                                                                                |
| **More actions** (⋮)  | **Rebuild index**, **Repair index**, **Drain queued work**, and **Delete profile**.                                                                                                                                                                                                                      |

### Choose the Source

If your source content is in PDFs, Word documents, or scans, extract their text into fields on the source records before creating the profile. AI Search does not read record attachments. Include the extracted text fields in the [body template](https://docs.contextual.io/connect/ai-search/concepts-and-configuration.md#templates).

1.  Select one source Object Type. Native Object is the only indexable source kind, and system types are excluded.

2.  Inspect representative records, including long records and records with missing optional fields.

3.  Decide whether all records are eligible. If eligibility is narrower, enter a **Query predicate** as a JSON object and check it against both an included and excluded record. The predicate uses Native Object `$query` field paths with these operators: comparison (`$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$in`, `$nin`), logical (`$and`, `$or`, `$nor`, `$not`), element (`$exists`, `$type`), array (`$all`, `$elemMatch`, `$size`), `$mod`, and `$regex` with `$options`. A profile whose query uses any other operator does not save.

4.  Identify the fields that contain useful evidence. Resolve whether referenced IDs need descriptive data in the source record.

Source eligibility controls indexing membership. It is separate from a named index’s [static filters](https://docs.contextual.io/connect/ai-search/concepts-and-configuration.md#static-filters).

### Create a Profile

1.  Select **New profile**.

2.  Under **Identity**, enter a **Profile ID** (kebab-case: lowercase letters, numbers, and hyphens, 3–64 characters; it can’t be changed later), a **Name**, and an optional **Description**. Write the description for both people and language models; it is surfaced in AI Generate tool descriptions.

3.  Under **Source**, choose the **Source object type** and, if needed, a **Query predicate**. The source can’t be changed after creation.

4.  Under **Template**, add a required **Body** and, if useful, a short **Header**. Start with **Generate from schema** or write the template yourself. Check **Fields referenced** and the **Preview**, including the chunk preview.

5.  Keep the initial **Chunking** and **Embedding** settings unless you have evidence that they need to change.

6.  Under **Projections**, select **Add projection** for each result attribute or filter field you need. Check each value in the projection **Preview**.

7.  Under **Indexes**, select **Add index** to configure at least one named index. Enter an **Index ID** and **Name**, and choose **Mode**, **Top K**, **One result per document**, optional **Rerank**, and optional **Static filters**.

8.  In the bar at the bottom, select **Create profile**. (Select **Discard changes** to abandon the form.)

The profile page opens with the status **Indexing**. Search is available during the first build, but results may be incomplete until the index is **Ready**.

#### Initial settings

| **Setting**       | **Initial value or check**                                                        |
|-------------------|-----------------------------------------------------------------------------------|
| Template → Header | Leave empty initially; keep it short when used.                                   |
| Template → Body   | Include useful facts and readable labels; inspect a real sample.                  |
| Chunking          | Plain-text window, 1,600 characters, 10%, **Strict windows** unchecked.           |
| Embedding         | `voyage-4`, 1,024 dimensions.                                                       |
| Projections       | Add only the attributes needed; preview values and types.                         |
| First named index | Hybrid, Top K 10, one result per document on, no static filters, rerank disabled. |

See [Search Concepts and Configuration](https://docs.contextual.io/connect/ai-search/concepts-and-configuration.md) for definitions, supported values, and examples.

### Check Readiness

1.  Wait for the status card to show **Ready** and check **Record errors**.

2.  On the **Query** tab, select your named index and ask a question that a known source record should answer.

3.  Check that the results include that record and relevant matched text. Select the record ID to preview the record.

4.  Keep the profile ID, index ID, and query text so another reader can repeat the test, through the console or the [Native Object API](https://docs.contextual.io/connect/ai-search/query-and-use-results.md#query-through-the-native-object-api).

### Change an Existing Profile

Edit named indexes on the **Indexes** tab and everything else on the **Configuration** tab. When you change a field, a bar appears with **Discard changes** and **Save changes**. Discarding asks you to confirm (“Your edits will be lost.”). What **Save changes** does depends on what you changed:

| **Change**                                                                            | **What Happens on Save**                                                                                                                                                                                                                                                             |
|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Named index settings: mode, Top K, one result per document, static filters, reranking | Saves immediately with no prompt. Queries that name the index use the new settings. Stored embeddings do not change.                                                                                                                                                                 |
| Projections only                                                                      | Saves with no rebuild prompt. Contextual repairs the existing index in place and reuses stored embeddings. Retiring, re-enabling, or removing a projection saves the same way.                                                                                                       |
| Projection type the stored column can’t hold                                          | Opens **Rebuild \<profile\> into a fresh index?**, listing each conflict. **Cancel** leaves the profile unchanged (“Save canceled”); **Save and rebuild** saves and rebuilds. See below.                                                                                             |
| Source query, template, chunking, or compatible embedding model                       | When the profile has an active generation, opens **Apply the change to \<profile\>**. **Keep embeddings** saves the configuration without starting a rebuild, provided its dimensions match the active generation. If a rebuild to different dimensions is still running, wait for it to finish before choosing **Keep embeddings**, or choose **Re-embed everything** instead. **Re-embed everything** requests reprocessing, subject to the generation-reuse behavior described below. **Cancel** leaves the profile unchanged. Without an active generation, saving requires a **Rebuild index** confirmation, even though first-build searches may already return partial results. |
| Dimensions                                                                            | Opens **Rebuild the index for \<profile\>?**. Choose **Rebuild index** to submit the change, or **Cancel** to leave the profile unchanged.                                                                                                                                           |

> Queries use the serving generation’s embedding model and dimensions. Choosing **Keep embeddings** preserves the active generation’s embedding configuration. A rebuild already in progress keeps the model it started with.
>
> **Re-embed everything** does not always start a new generation. A matching build can continue. Returning to a configuration previously saved with **Keep embeddings** can retain the active generation and cancel a pending rebuild.
>
> To force a fresh generation using the saved configuration, select **More actions → Rebuild index**. This re-embeds every matching source record and can incur significant embedding costs.

To request a full rebuild at any time, select **More actions → Rebuild index**, then confirm **Rebuild index**. A rebuild creates a new generation and embeds every matching source record again; large sources can incur significant embedding costs. Queries use the current index until the rebuild finishes.

**Save and rebuild** for a projection type conflict builds a fresh index that declares only the active projections. The serving index keeps answering queries with its current projections until the new index takes over. Then its stored columns and values are discarded. An index that is already being built is replaced and loses its work so far. Every record is embedded again, at the cost of a full rebuild. Filters and clients that read the changed columns see the new types after cutover.

#### Projection columns

The **Projection columns** section at the top of the Configuration tab shows how many columns the index has. Expand it to see a table of columns with **Column**, **Configured as**, **Stored type**, and **Status**. By default the table lists only columns that need attention; select **Show all N columns** to see every column or **Show only flagged columns** to return to the shorter list. When nothing needs attention, the section says so. **About column types** links to [Projection Types and Stored Columns](https://docs.contextual.io/connect/ai-search/concepts-and-configuration.md#projection-types-and-stored-columns).

Only three statuses are flagged:

| **Status** | **Meaning**                                                                                                                |
|------------|----------------------------------------------------------------------------------------------------------------------------|
| Conflict   | The configured type doesn’t fit the stored column. Use a new alias or rebuild.                                             |
| Retired    | Not written, returned, or filterable until re-enabled. Values already stored stay in place, and the column keeps its type. |
| Reserved   | No longer in the profile. The name and type stay taken in this index until a rebuild.                                      |

Other columns carry no status. An `int` stored type next to a `number` projection accepts whole numbers only and skips a record with a fraction. A removed projection shows **—** under **Configured as**.

Record one or more baseline queries before saving. After processing completes, rerun those queries and compare source IDs and evidence. See [Keep Search Up to Date](https://docs.contextual.io/connect/ai-search/keep-search-up-to-date.md) for repair and rebuild behavior.

### Delete a Profile

Select **More actions → Delete profile** or **Delete** in the profile’s row actions on the Search Profiles list.

> **Note:** Deleting a profile will permanently delete it with a warning “This search profile will be permanently deleted. This can't be undone”.