# 지식 구조

{% hint style="info" %}
젤라또가 답변하는 기본 베이스인 RAG 문서의 세팅 및 구조부터 챗봇이 답변 하는 흐름에 대해 설명합니다.
{% endhint %}

## **지식 구조 이해하기**

### **기능 개요**

* **지식 센터** \
  젤라또가 참조할 RAG 문서<sup>(Retrieval-Augmented Generation)</sup>를 업로드하고 관리합니다.
* **데이터 스토어** \
  지식 센터에 업로드된 RAG 문서를 목적별로 파일링하여 저장합니다.\
  챗봇이 빠르고 정확하게 필요한 정보를 찾도록 도와주는 중간 저장소 역할을 합니다.
* **시나리오**\
  챗봇이 사용자 질문에 어떻게 반응할지 결정하는 단계입니다.\
  두 가지 구성 요소로 이루어져 있습니다.
  * 플랜: 사용자의 의도를 파악하고 어떤 행동을 수행할지 결정
  * 행동: 데이터 스토어를 참조하거나 지침을 바탕으로 답변 생성

### **지식 연결 구조**

각 단계에서 문서를 아래와 같이 설정/연결함으로써, 업로드한 RAG 문서를 기반으로 사용자의 질문에 정확도가 높은 맞춤형 답변을 제공합니다.

<mark style="background-color:purple;">**지식 센터 → 데이터 스토어 → 시나리오**</mark> 순서로 설정하는 것을 권장 합니다.

<figure><img src="/files/ugAIS3MCaGhToXzMJFyG" alt=""><figcaption></figcaption></figure>

## **지식 구조와 답변 가능 케이스**

젤라또는 RAG 문서를 업로드 하여 시나리오 행동까지 작성을 하여야 기능합니다.

**정상 답변 가능 케이스**

<table><thead><tr><th width="101.1168212890625">RAG 문서</th><th width="112.5106201171875">데이터 스토어</th><th width="151.682861328125">시나리오(행동/플랜)</th><th>답변 방식</th></tr></thead><tbody><tr><td>업로드 O</td><td>설정</td><td>행동 설정</td><td>RAG 문서를 기반으로 깊이 있는 응답 가능</td></tr><tr><td></td><td></td><td>행동/플랜 설정</td><td>RAG 문서를 기반으로 빠르고 깊이 있는 응답 가능</td></tr></tbody></table>

<details>

<summary>발생 케이스별 상세</summary>

다음은 RAG 문서를 업로드 했을 때와 하지 않았을 때의 케이스 상세입니다.

<table><thead><tr><th width="101.1168212890625">RAG 문서</th><th width="112.5106201171875">데이터 스토어</th><th width="151.682861328125">시나리오(행동/플랜)</th><th>답변 방식</th></tr></thead><tbody><tr><td>업로드 X</td><td>설정 불가</td><td>미설정</td><td>정상 답변 불가</td></tr><tr><td></td><td>설정 불가</td><td>행동 설정</td><td>정상 답변 불가 + 행동의 지침에 작성된 내용 기반 답변</td></tr><tr><td></td><td>설정 불가</td><td>플랜 설정</td><td>정상 답변 불가 + 플랜의 지침에 작성된 내용 기반 답변</td></tr><tr><td></td><td>설정 불가</td><td>행동/플랜 설정</td><td>정상 답변 불가 + 행동/플랜의 지침에 작성된 내용 기반 답변</td></tr><tr><td>업로드 O</td><td>미설정</td><td>미설정</td><td>정상 답변 불가<br>(문서가 업로드되어도 실제 답변에는 사용되지 않습니다.)</td></tr><tr><td></td><td>설정</td><td>미설정</td><td>정상 답변 불가<br>(문서가 업로드되어도 실제 답변에는 사용되지 않습니다.)</td></tr><tr><td></td><td></td><td>행동 설정</td><td>RAG 문서를 기반으로 깊이 있는 응답 가능</td></tr><tr><td></td><td></td><td>플랜 설정</td><td>정상 답변 불가<br>(문서가 업로드되어도 실제 답변에는 사용되지 않습니다.)</td></tr><tr><td></td><td></td><td>행동/플랜 설정</td><td>RAG 문서를 기반으로 빠르고 깊이 있는 응답 가능</td></tr></tbody></table>

</details>

## **요약**

{% hint style="warning" %}
RAG 문서 업로드만으로는 챗봇의 답변에 업로드 한 문서를 활용하지 않습니다.
{% endhint %}

{% hint style="success" %}
지식센터에서 업로드한 RAG 문서는 반드시 데이터 스토어에 파일링하고,\
시나리오에서 행동으로 연결하여 플랜에서 분류해야 지식 기반 응답이 가능합니다.
{% endhint %}

{% hint style="success" %}
구조를 잘 설정하면 빠르고 정확한 응답이 가능합니다.
{% endhint %}


---

# 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://groobee.gitbook.io/gelatto/getting-started/overview/knowledge-structure.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.
