# AI Tutor - RAG system

## RAG System Overview <a href="#title-text" id="title-text"></a>

Our Retrieval-Augmented Generation (RAG) system is a robust framework designed to enhance the accessibility and usability of learning content. The system operates through three interconnected processes.

<figure><img src="/files/BVwuXC4eWIdl68M5m7Ge" alt=""><figcaption><p>RAG Overview created by EduPLEx</p></figcaption></figure>

First, during the **ingestion phase**, the learning content is processed into structured text chunks, which are then stored in an OpenSearch index to enable efficient retrieval.

Next, in the **retrieval phase**, the system leverages the capabilities of OpenSearch to identify and retrieve the most relevant text chunks based on user queries, ensuring accuracy and relevance.

Finally, the **answer generation phase** utilizes a Large Language Model (LLM) to synthesize coherent and contextually appropriate responses, drawing from the retrieved content. This integrated approach ensures that users receive precise and informative answers tailored to their needs, making the system a powerful tool for knowledge exploration and learning.


---

# Agent Instructions: 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.eduplex.eu/text-analysis/ai-tutor-rag-system.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.
