Skip to main content
  1. AI/

Getting Started with RAG

·128 words·1 min·
Blog Author
Author
Blog Author
A bilingual blog built with Hugo and Blowfish.
Table of Contents

Why RAG
#

LLM knowledge has a cutoff date and can’t cover private documents. Retrieval-augmented generation (RAG) first retrieves relevant content from a knowledge base, then has the model answer based on it — sharply reducing hallucinations.

Workflow
#

  1. Offline indexing: chunk documents, embed them, store in a vector DB
  2. Online retrieval: embed the question and fetch the most similar chunks
  3. Generation: stitch retrieved chunks into the prompt and let the LLM answer

Key points
#

  • Chunking: size and overlap affect retrieval quality
  • Hybrid search: vector + keyword (BM25) complement each other
  • Reranking: fine-tune relevance of final answers
  • Evaluation: measure continuously with RAGAS and similar tools

Summary
#

RAG turns LLMs from “generic talk” into “evidence-based answers”. It’s one of the most common patterns for enterprise LLM adoption.