Tag: 임베딩
All the articles with the tag "임베딩".
-
RAG Embedding Comparison — Measuring recall@k on My Blog Data (OpenAI vs bge-m3)
After establishing the ["feeling-based benchmarking → numeric benchmarking" principle](/en/posts/quant-study-00-pandas) in my quant retrospective, I actually quantified an embedding model comparison this time. I indexed 441 chunks from my blog posts with OpenAI text-embedding-3-small and bge-m3 respectively, then measured recall@3 with a test set of 20 question-answer source pairs. Overall: OpenAI 80% vs bge-m3 90%. bge-m3 hit 100% on hard-difficulty questions — the decisive factor was connecting to the source text by meaning even when words didn't overlap. On easy questions, the misses turned out to be caused by typos (cladue, underscores) — a twist showing the grading criteria itself was wrong.
-
Eval Study #2 — The Pitfalls of Similarity-Based Evaluation, 5 Principles of Test Set Design, and a Misunderstanding About the Term 'Regression Test'
My second session studying Eval. I ran similarity-based evaluation (embedding cosine similarity) myself and got an unexpected result — both OpenAI's text-embedding-3-small and bge-m3 gave the highest score to the 'wrong answer.' This is because similarity captures topical/expressive closeness, not content correctness. Just a difference in markdown formatting can swing similarity scores significantly. In practice, combining similarity with LLM-as-Judge is the standard approach. Also covers 5 principles of test set design, plus a terminology correction: it's not a 'regression test,' it's improvement validation (A/B).
-
Building RAG from Scratch — Embedding, Cosine Similarity, Chunk Search (with Korean vs English Comparison)
Carving out the inside of RAG (Retrieval-Augmented Generation) with actual code, from what embedding even is to debugging suspicious results. I pulled 1536-dimension vectors with OpenAI's text-embedding-3-small, compared them with cosine similarity, compared Korean vs English performance, and worked through chunk splitting. Surprisingly, Korean embedding similarity turned out to be lower.