기본기 다지기

[기본이론] CME295 7강

syveany 2026. 6. 4. 04:06

RAG

Hyperparameters

- Embedding size

- Chunk size

- Overlap between chunks

 

지표의미

NDCG@k (Normalized Discounted Cumulative Gain at k) 정답을 얼마나 위쪽에 배치했느냐

  같은 정답이라도 위에 있을 수록 높게 평가함

RR@k (Reciprocal Rank at k) 첫 정답이 몇 등인가

Recall@k 정답을 얼마나 많이 찾았냐

Precision@k 가져온 것 중 정답이 몇 개냐

 

 

Tool calling

RAG: 문서를 찾아 읽는 기술

Tool Calling: 외부 함수·API·DB를 실제로 실행하는 기술

 

단점

- more tools -> decreased performance

- Finite context length: not scalable

- Many tools to define. Lots of work

 

Router: 누구를 부를지 결정

MCP: 어떻게 연결할지 결정. model context protocol

 

ReAct

input -> observe -> plan -> act

 

 

Agent 해결법

- Training steps 학습할 때부터 이런 행동은 하면 안 된다고 가르침

- Inference safeguards 실행 중 안전장치

- Benchmarks e.g. Agent-SafetyBench 안전성 시험 (매우 중요)