0Pricing
LangChain / RAG / Vector DBs · 강의

임베딩과 벡터 데이터베이스

텍스트 임베딩이 의미를 벡터로 변환하는 방식과 벡터 데이터베이스가 RAG의 핵심인 검색 단계를 가능하게 하는 방식을 이해해 보세요.

임베딩과 벡터 데이터베이스은(는) CoddyKit의 무료 LangChain / RAG / Vector DBs 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 LangChain / RAG / Vector DBs 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. LangChain / RAG / Vector DBs 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

From Words to Vectors

Computers cannot compare meaning directly. An embedding is a vector of numbers representing a text’s meaning, so similar texts land close together.

What an Embedding Looks Like

An embedding model maps text to a fixed-length vector with hundreds or thousands of dimensions. The numbers are not readable — what counts is their geometric relationships.

text = 'a cup of coffee'
embedding = [0.12, -0.04, 0.88, 0.31]  # simplified
print('dimensions:', len(embedding))

Semantic Similarity

Because meaning maps to position, "dog" sits near "puppy" but far from "database". That is what powers semantic search — matching by meaning, not exact keywords.

Measuring Closeness

The go-to closeness metric is cosine similarity — the cosine of the angle between two vectors. 1 means nearly identical, 0 means unrelated.

def cosine(a, b):
    dot = sum(x*y for x, y in zip(a, b))
    na = sum(x*x for x in a) ** 0.5
    nb = sum(y*y for y in b) ** 0.5
    return dot / (na * nb)

print(round(cosine([1, 0, 1], [1, 0, 1]), 2))
print(round(cosine([1, 0, 0], [0, 1, 0]), 2))

Why a Vector Database?

RAG must find the most relevant chunks among millions of vectors, fast. A vector database stores embeddings and finds nearest neighbors — something SQL is not built for.

Approximate Nearest Neighbor

Comparing a query to every vector is too slow at scale. Vector DBs use ANN indexes like HNSW that trade a sliver of accuracy for huge speed gains.

Indexing Documents

To build a knowledge base, index your docs: split into chunks, embed each one, and store the vector with its text and metadata. This is RAG’s offline ingestion step.

chunks = ['intro paragraph', 'pricing details', 'support hours']
for c in chunks:
    vec = embed(c)        # call embedding model
    db.upsert(vec, text=c)

Querying

At query time, embed the user’s question with the same model, then ask the vector DB for the top-k nearest chunks — that becomes the LLM’s context.

q_vec = embed('when is support open?')
results = db.search(q_vec, top_k=3)
for r in results:
    print(r.text, r.score)

Metadata Filtering

Vector DBs also support metadata filtering: combine similarity search with filters like language, date range, or owner to sharpen relevance.

db.search(q_vec, top_k=3, filter={'lang': 'en', 'year': 2026})

Choosing a Vector Store

Your vector store options span libraries (FAISS), dedicated DBs (Pinecone, Weaviate, Qdrant, Milvus), and extensions like pgvector. Pick by scale, hosting, and data needs.

Embeddings in the RAG Pipeline

Embeddings and the vector DB are the retrieval half of RAG: index once, then for every question embed, search, and hand the top chunks to the LLM as grounding.

Quick Check

Test your understanding of embeddings and vector search.

Recap

You learned RAG’s retrieval foundation: embeddings turn meaning into vectors, cosine measures closeness, and vector DBs use ANN for fast nearest-neighbor search.

자주 묻는 질문

“임베딩과 벡터 데이터베이스” 강의는 무료인가요?

네 — “임베딩과 벡터 데이터베이스” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 LangChain / RAG / Vector DBs 강의 전체를 잠금 해제할 수 있습니다. LangChain / RAG / Vector DBs 강의에는 총 4개의 강의가 포함되어 있습니다.

“임베딩과 벡터 데이터베이스”에서 뭘 배우나요?

텍스트 임베딩이 의미를 벡터로 변환하는 방식과 벡터 데이터베이스가 RAG의 핵심인 검색 단계를 가능하게 하는 방식을 이해해 보세요. 브라우저에서 직접 실행하는 실습 코드로 LangChain / RAG / Vector DBs을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

LangChain / RAG / Vector DBs을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 LangChain / RAG / Vector DBs은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.

“임베딩과 벡터 데이터베이스” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 LangChain / RAG / Vector DBs 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 LangChain / RAG / Vector DBs 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 대규모 언어 모델이란 무엇인가요?
  2. 검색 증강 생성이 필요한 이유
  3. RAG 시스템의 핵심 구성 요소
  4. 임베딩과 벡터 데이터베이스
← LangChain / RAG / Vector DBs(으)로 돌아가기