> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/guides-and-quickstarts/knowledge-and-retrieval/sync-and-ingestion-lifecycle.md).

# Sync and ingestion lifecycle

Synchronization refreshes a knowledge base from its connected sources. Ingestion then extracts and indexes the updated content. These are separate stages of making new information searchable.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FmAI88Kfqyp8fdiNPttPT%2FG038.mp4?alt=media&token=295ef769-2101-4901-bf75-ca0aad60236a>" %}

## Before you start

Use a knowledge base connected to a provider or website source. For manually uploaded files, use [Knowledge base maintenance](https://docs.stackai.com/guides-and-quickstarts/knowledge-and-retrieval/knowledge-base-maintenance.md) instead. Have access to edit the original source and to synchronize the base.

## Review the current source content

Review Last synced and inspect a document's Parsed text.

![Current synchronized document content](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/6h9Yz821nknHqsYzzAyG/assets/g038-g038-01-baseline.png)

Identify the content currently available in the knowledge base before checking for an update.

## Save changes in the source application

Make and save the intended change in the original connected source.

![Connected source document changes](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/PkHnlZtUqn1M0jJ6YTCX/assets/g038-g038-02-edit.png)

Synchronization cannot retrieve a change that the source application has not saved.

## Synchronize the files

Return to the knowledge base and choose More Options → Sync Files.

![Source synchronization and indexing status](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/JNfEQcHY6F9WSLUFFnwi/assets/g038-g038-03-sync.png)

Allow both synchronization and indexing to finish before checking retrieval.

Use the status filter to inspect Pending, Error, and Indexed files.

![Source synchronization and indexing status](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/JBuLcvwpPRY54h5X4TLw/assets/g038-g038-04-status.png)

Resolve failed or unfinished processing before relying on the updated collection.

## Review the updated content

Open the document’s Parsed view and locate the updated content.

![Updated source content and retrieval](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/aQwsVvgX2gVBXJlrgBFj/assets/g038-g038-05-updated.png)

This view shows the text currently available in the knowledge base.

Use Evaluate to ask about the updated information.

![Updated source content and retrieval](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/OQOg0D3WYgRZnniWG6XB/assets/g038-g038-06-retrieval.png)

Confirm that the returned passage contains the new content and attributes it to the correct source.

## Enable automatic synchronization

Enable Auto Sync when the knowledge base should refresh connected sources automatically.

![Automatic source synchronization setting](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/cIjH4mJfzEKpWiLYXFhJ/assets/g038-g038-07-auto.png)

Use Last synced and file status to monitor subsequent updates.

## Recover from missing or stale content

| What you see                                                | What to check and do next                                                                                                                                                                                                                                                                                                |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| A file is still **Pending**                                 | Processing is unfinished. Refresh the list and wait for **Indexed** before judging retrieval. If it remains unfinished, collect the filename, status, and last attempted operation for support rather than starting repeated imports.                                                                                    |
| A file is **Error**                                         | Read the error information associated with the file or failed-operation notification. Correct the reported file/access issue first. Use [Item actions → Reindex](https://docs.stackai.com/guides-and-quickstarts/knowledge-and-retrieval/knowledge-base-maintenance.md) to retry processing content already in the base. |
| **Indexed**, but connected content is stale                 | Save the edit in the original provider, confirm the file remains selected, and run **More Options → Sync Files**. Reindex alone does not fetch the provider's latest version.                                                                                                                                            |
| **Parsed** contains the new text, but the answer is missing | Query that fact in **Evaluate**. Inspect returned sources, then review the consuming workflow's search settings, filters, and account permissions.                                                                                                                                                                       |
| The provider connection fails                               | [Check connection health and reconnect](https://docs.stackai.com/guides-and-quickstarts/using-tools-and-actions/create-and-manage-connections.md) if needed, then retry synchronization.                                                                                                                                 |

If these steps do not resolve the issue, use [Support and deployment diagnostics](https://docs.stackai.com/guides-and-quickstarts/personal-settings-and-support/support-and-deployment-diagnostics.md) and provide the knowledge-base name, source/filename, status, error text, and time of the attempt. Keep provider credentials out of the report.

## Important behavior

Synchronization retrieves source changes. Indexing then makes the updated content searchable. Wait for both before using the new information.

## Continue

* [Knowledge base maintenance](https://docs.stackai.com/guides-and-quickstarts/knowledge-and-retrieval/knowledge-base-maintenance.md)
* [Evaluate retrieval](https://docs.stackai.com/guides-and-quickstarts/knowledge-and-retrieval/evaluate-retrieval.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/guides-and-quickstarts/knowledge-and-retrieval/sync-and-ingestion-lifecycle.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
