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

# Managing content

> Update, delete, and re-index sources over time.

KBs are not static. Products change, policies update, support articles get rewritten. This page covers the operational side of keeping a KB current.

## Re-ingesting a source

Source content is **frozen at ingestion**, and there is no in-place "refresh." To pull the latest version of a page or file, **delete the source and add it again**:

1. Open the KB → click the source.
2. Delete it.
3. Add it again (same URL or file). It goes back through `converting_to_markdown → chunking → embedding → ready`.

For URL content you can also re-run a [URL-pattern attach](/knowledge-bases/api-usage#pattern-based-bulk-add) to re-pull a batch of pages.

## Delete a source

From the source list, click the menu → **Delete**. Embeddings are removed immediately; subsequent queries will not include this source's chunks.

## Bulk operations

For KBs with many sources, the UI gets tedious fast. Use the API (all paths under `/knowledge-base`):

| Operation             | Endpoint                                                           |
| --------------------- | ------------------------------------------------------------------ |
| List sources in a KB  | `GET /knowledge-base/datasets/{id}/sources`                        |
| Attach source(s)      | `POST /knowledge-base/datasets/{id}/sources`                       |
| Attach by URL pattern | `POST /knowledge-base/datasets/{id}/sources/pattern`               |
| Detach a source       | `DELETE /knowledge-base/datasets/{id}/sources/{dataset_source_id}` |

<Note>
  Detaching uses the **`dataset_source_id`** (the attachment id from the sources list), not the underlying `source_id`. Detaching removes the source's embeddings from that KB without deleting the source itself.
</Note>

A common pattern is a nightly workflow that:

1. Pulls a list of canonical URLs from your CMS
2. Diffs against the KB's current sources
3. Adds new ones, re-ingests changed ones (delete + re-add), deletes orphaned ones

## Switching embedding models

Changing the embedding model on an existing KB triggers re-embedding of every source. During re-embedding:

* The KB stays queryable using the old embeddings
* New embeddings are computed in the background
* Once complete, queries switch over

Plan re-embedding for off-hours on large KBs — it incurs the corresponding embedding cost.

## Versioning content

KBs themselves are not versioned. There's no "publish" step on a KB — changes are live as soon as a source's status reaches `ready`.

If you need versioning (e.g. to roll back content updates), the pattern is:

1. Create a new KB (`Product FAQ v2`)
2. Update agent attachments to point at it
3. Test
4. Delete the old KB once confident

## Monitoring

The KB list page shows daily source counts and total source counts per KB. For deeper monitoring:

* Use the API to fetch source counts and statuses
* Set up a workflow on a daily cron that alerts if any source status is `failed`

## Limits

* Plan-based source counts per KB
* Embedding rate limits inherited from your OpenAI/Azure quota when using your own keys
