Tag: LLM공부
All the articles with the tag "LLM공부".
-
Building a RAG Q&A System with Chroma + My Blog — From Parts to System
Yesterday I played with the parts of RAG (embedding / cosine similarity / chunks). Today, I put them together into a system. I introduced the Chroma vector DB, indexed 270 chunks from my blog, and built a Q&A system with OpenAI + Claude. The most memorable moment was when it answered 'I don't know' to a question about information not covered on my blog.
-
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.
-
Claude API Error Handling and Retry — Distinguishing Transient, Permanent, and Format Errors + Exponential Backoff
What errors should I handle, and how, to build a reliable LLM service? I classify errors into transient / permanent / user input / response format categories, and practice through 4 stages: basic try-except wrapper → Exponential backoff → Anthropic SDK built-in retry → JSON response validation.
-
Prompt Caching — Bringing Input Cost Close to Zero for Repeated Inputs
Prompt caching is essential for chatbots, agents, and RAG that send long system prompts or the same context on every call. I ran a direct comparison with and without caching using STM32/embedded questions — cost dropped by half, and time dropped slightly.