> 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.md).

# Optimizing Documents for RAG Indexing

**Retrieval Augmented Generation (RAG)** combines the power of **Natural Language Processing (NLP)** with the capabilities of **Large Language Models (LLMs)** to enable applications to understand natural speech and learn from ingested knowledge.

Even with the best LLM, the model is unlikely to be trained or optimized for your specific use case.&#x20;

To get the best results, you need to refine your input before documents are processed. You will still benefit from NLP and document chunking, but some upfront preparation is required.

This section covers everything you need to know about document optimization:

* [When to Optimize Documents](/aisera-platform/adding-data-to-your-tenant/data-ingestion/optimizing-documents-for-rag-indexing/when-to-optimize-documents.md): How to identify when poor RAG results are a content problem and when to act on it.
* [How to Optimize Documents](/aisera-platform/adding-data-to-your-tenant/data-ingestion/optimizing-documents-for-rag-indexing/how-to-optimize-documents.md): Recommendations for structuring and preparing your documents before ingestion.
* [Re-indexing and Testing After Optimization](/aisera-platform/adding-data-to-your-tenant/data-ingestion/optimizing-documents-for-rag-indexing/re-indexing-and-testing-after-optimization.md): How to re-ingest your optimized documents and validate the results.
* [Document Optimization Examples](/aisera-platform/adding-data-to-your-tenant/data-ingestion/optimizing-documents-for-rag-indexing/examples-of-document-optimization.md): Real-world examples showing how optimization strategies apply across different content types.
