> For the complete documentation index, see [llms.txt](https://docs.aisera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aisera.com/aisera-platform/adding-data-to-your-tenant/data-ingestion/optimizing-documents-for-rag-indexing/when-to-optimize-documents.md).

# When to Optimize Documents

Document optimization is not a required step every time you update your content. Aisera's RAG system is designed to index and retrieve information from well-structured documents, but the quality of the answers it returns is directly tied to the quality of the content it ingests. If your documents are unclear, poorly structured, or missing key context, your RAG model will reflect that.

The primary signal that your documents need optimization is poor answer quality. If your application or bot is returning inaccurate, vague, or irrelevant answers, the root cause may be the content itself rather than a configuration issue. Common signs that a content problem may be to blame include:

* **Vague or incomplete answers:** The RAG model is retrieving content but cannot generate a precise response, often because the source material lacks focus or context.
* **No results returned:** The indexer cannot find a relevant match, which may indicate that key terms, headings, or structure are missing from the document.
* **Off-topic matches:** The model is returning answers from the wrong section or document, which can happen when content is poorly chunked or semantically inconsistent.

If you are seeing these issues, review your documents against the recommendations in [How to Optimize Documents](/aisera-platform/adding-data-to-your-tenant/data-ingestion/optimizing-documents-for-rag-indexing/how-to-optimize-documents.md) before re-indexing.

## When Optimization Is at Your Discretion

Beyond poor answer quality, when you optimize your content is up to you. You may choose to revisit your documents when you make significant content updates, add new topics, or retire outdated information. Aisera does not require optimization on a set schedule. The goal is to ensure that the content your RAG model indexes is accurate, well-structured, and relevant to the questions your users are asking.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aisera.com/aisera-platform/adding-data-to-your-tenant/data-ingestion/optimizing-documents-for-rag-indexing/when-to-optimize-documents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
