Embeddings 핵심 기능 — Cohere Embed 모델과 input_type
Embeddings 핵심 기능
Cohere의 임베딩은 텍스트를 수치로 바꿔 언어에 구애받지 않는 유사성 검색과 저장 압축을 가능하게 해요. Embed V4 시리즈와 다양한 input_type을 제공해요.
Embed V4 모델
Cohere의 Embed V4 모델은 문서·질의·압축 등 여러 용도를 고려해 설계됐어요. 멀티모달(텍스트+이미지) 임베딩도 지원해서 검색 범위를 넓힐 수 있어요.
input_type으로 용도 구분
같은 모델이라도 용도에 따라 input_type을 지정해요.
import cohere
co = cohere.Client(api_key="YOUR_API_KEY")
response = co.embed(
texts=["문서 내용을 여기에"],
model="embed-english-v3.0",
input_type="search_document",
)
embeddings = response.embeddings
주요 input_type 값:
search_document: 검색 대상 문서search_query: 검색 질의classification: 분류 입력clustering: 군집화 입력
임베딩의 핵심 특성
- 언어 무관: 의미가 같으면 언어가 달라도 비슷한 벡터
- 압축 친화: 벡터를 줄여 저장·전송 효율 개선
- 동적 스칼라 양자화 연동으로 저장 공간 절약