> For the complete documentation index, see [llms.txt](https://whitepaper.virtuals.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whitepaper.virtuals.io/virtuals-protocol-whitepaper-ko/virtuals-1/the-protocol/ai-1/ai/ai-nft/ai.md).

# AI 에이전트를 위한 인지 코어

개인화된 AI 에이전트를 위해 LLM, RAG, 파인튜닝, 벡터 데이터베이스, 영속 메모리를 결합한 Virtuals Protocol 인지 코어를 살펴보세요.

Cognitive Core는 VIRTUAL 에이전트를 위한 중앙 지능 계층입니다. 대규모 언어 모델(LLM), 검색, 지속적 메모리를 사용해 작업을 실행하고 고유한 AI 에이전트 개성을 제공합니다.

### AI 에이전트를 위한 대규모 언어 모델

VIRTUAL 에이전트는 오픈소스 LLM을 사용합니다. Cognitive Core는 검색 증강 생성과 모델 미세 조정을 결합하여 각 에이전트의 개성과 도메인 지능을 구축합니다.

* **AI 에이전트 개성 개발**\
  검색 증강 생성(RAG)은 에이전트의 배경 이야기, 전설, 특성, 특징을 개발합니다. RAG는 언어 생성과 지식 베이스 검색을 결합하여 더 관련성 높고 생생한 AI 에이전트 상호작용을 만듭니다.
* **AI 에이전트 중앙 지능**

  충분한 데이터셋을 가진 VIRTUAL 에이전트는 오픈소스 모델의 직접 미세 조정을 사용합니다. 미세 조정은 정확하고 도메인에 특화된 응답을 개선합니다. 지시 미세 조정은 AI 에이전트의 응답과 행동을 정의된 규칙이나 목표에 더욱 맞춥니다.\
  \
  더 작은 데이터셋은 벡터 데이터베이스에 저장되고 RAG를 통해 검색됩니다. 이를 통해 AI 에이전트는 특수한 정보에 효율적으로 접근할 수 있습니다.

### AI 학습 데이터 전처리

AI 에이전트 학습 데이터에는 교과서, 포럼, 위키의 텍스트, 비디오, 오디오가 포함될 수 있습니다. Cognitive Core는 주로 텍스트 기반 LLM을 사용합니다. 비디오 및 오디오 학습 데이터는 모델 학습 전에 전사가 필요합니다.

* **데이터 정제:** 데이터 무결성과 품질을 유지하기 위해 노이즈와 null 값을 제거합니다.
* **데이터 변환:** 신뢰할 수 있는 모델 학습을 위해 데이터셋을 표준화합니다.

### 지속적 AI 에이전트 메모리 및 대화 컨텍스트

VIRTUAL 에이전트는 개인화되고 문맥을 인식하는 상호작용을 위해 지속적 메모리 시스템을 사용합니다. 이 시스템은 효율적인 장기 메모리 처리를 지원하면서 대화 컨텍스트를 유지합니다.

1. **사용자 및 대화 식별:** 시스템은 정확한 기억을 위해 사용자와 그들의 대화를 식별합니다.
2. **긴 대화 저장:** 시스템은 장시간의 대화를 효율적으로 저장하고 처리합니다.

#### 고유 사용자 식별자

각 VIRTUAL 에이전트 사용자에게는 고유 식별자가 부여됩니다. 이는 사용자별 컨텍스트와 대화 연속성을 유지합니다.

<details>

<summary>샘플 데이터베이스 테이블</summary>

샘플 데이터베이스 테이블은 아래와 같이 구성됩니다.

```sql
CREATE TABLE Messages (
    message_id VARCHAR(32) NOT NULL PRIMARY KEY,
    conversation_id VARCHAR(32) NOT NULL,
    user_id VARCHAR(32) NOT NULL,
    prompt TEXT NOT NULL,
    timestamp DATETIME NOT NULL,
    response TEXT, 
    FOREIGN KEY (conversation_id) REFERENCES Conversations(conversation_id)
);

```

</details>

#### 벡터 데이터베이스 및 메모리 검색

임베딩 기법은 효율적인 저장과 검색을 위해 메시지를 수치 형식으로 벡터화합니다.

the `getPrompt('identifier', 'context', 'params')` 함수가 실행되면 시스템은 벡터 데이터베이스에서 사용자의 메시지를 검색합니다. LLM은 이 검색된 대화 기록을 사용하여 dApp에서 추가 컨텍스트를 요구하지 않고도 개인화되고 문맥적으로 관련성 있는 응답을 생성합니다.

[<mark style="color:빨간색;">Cognitive Core에 기여하는 방법을 더 알아보세요.</mark>](/virtuals-protocol-whitepaper-ko/builders-hub/virtuals/agent-contribution/contribute-to-cognitive-core.md)


---

# 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, and the optional `goal` query parameter:

```
GET https://whitepaper.virtuals.io/virtuals-protocol-whitepaper-ko/virtuals-1/the-protocol/ai-1/ai/ai-nft/ai.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
