> For the complete documentation index, see [llms.txt](https://docs.openagrinet.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openagrinet.global/technical/ai-layer/data-ingestion-pipeline/batch-processing-and-reusable-utilities.md).

# Batch Processing & Reusable Utilities

The ingestion utilities support batch processing of multiple documents in a single execution. Documents can be processed at a folder level, enabling scalable ingestion of large datasets.

During batch execution, progress is tracked and logged. Failures for individual documents are captured separately, allowing ingestion to continue for remaining documents without interruption. This supports operational reliability and simplifies reprocessing of failed inputs.

The ingestion pipeline produces multiple output artefacts as part of AI module setup. These include cleaned Markdown files, structured and tokenised datasets prepared in the standard ingestion schema, and associated metadata required for vector database indexing. These artefacts form the input for the retrieval layer and are reused across deployments without requiring reprocessing, unless source documents change.

All OCR, document processing, and ingestion activities are performed offline as part of AI module setup and configuration. These steps are not invoked during live user interactions. At runtime, the AI module operates only on pre-ingested data through retrieval and tool-based APIs, ensuring predictable latency and performance during user queries.

<div data-with-frame="true"><figure><img src="https://496953384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSb3jldXQwe68uba6eZGW%2Fuploads%2FhMC2EURNBZX62ADevCGH%2Funknown.png?alt=media&amp;token=c70fc608-2f2a-4ca0-8546-3c649666bab1" alt=""><figcaption></figcaption></figure></div>

\ <br>


---

# 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.openagrinet.global/technical/ai-layer/data-ingestion-pipeline/batch-processing-and-reusable-utilities.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.
