Skip to content

Commit a0070d6

Browse files
committed
add. page. basemin - rag.
1 parent 14cf075 commit a0070d6

65 files changed

Lines changed: 2538 additions & 265 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

blog/content/page/playlists/index.en.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ menu:
1111

1212
## 📚 Basics
1313

14-
Short track on AI: terms and language models → LLM overview → **prompt engineering** as its own article.
14+
Short track on AI: terms and language models → LLM overview → **prompt engineering** and **RAG systems** as separate articles.
1515

1616
- **[AI basics – introduction](/en/p/ai-basics-intro/)**
1717
- 🎬 [Video](https://youtu.be/z9VBZn0XcVk) · reading 5 min / video 4 min
@@ -30,6 +30,12 @@ Short track on AI: terms and language models → LLM overview → **prompt engin
3030
- 🏷️ prompt engineering, zero-shot, few-shot, CoT, role prompting, step-back, in-context learning
3131
- 📊 Difficulty: basic
3232
- 📋 Prerequisites: [LLM overview](/en/p/ai-basics-overview/) recommended
33+
- **[AI basics – RAG systems](/en/p/ai-basics-rag/)**
34+
- ⏱️ ~6 min read · no video
35+
- 📋 Why RAG, pipeline stages, chunking, naive vs advanced RAG; accordions
36+
- 🏷️ RAG, retrieval, embeddings, vector index, chunking, context-conditioned generation
37+
- 📊 Difficulty: basic
38+
- 📋 Prerequisites: [LLM overview](/en/p/ai-basics-overview/) recommended
3339

3440
## 👥 On Their Shoulders
3541

blog/content/page/playlists/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ menu:
1111

1212
## 📚 Базовый минимум
1313

14-
Короткий цикл про ИИ: термины и языковые модели → обзор LLM → **промпт-инжиниринг** как отдельная статья.
14+
Короткий цикл про ИИ: термины и языковые модели → обзор LLM → **промпт-инжиниринг** и **RAG-системы** отдельными статьями.
1515

1616
- **[Базовый минимум про ИИ – введение](/p/ai-basics-intro/)**
1717
- 🎬 [Видео](https://youtu.be/z9VBZn0XcVk) · чтение 5 мин / видео 4 мин
@@ -30,6 +30,12 @@ menu:
3030
- 🏷️ промпт-инжиниринг, zero-shot, few-shot, CoT, ролевой промптинг, step-back, in-context learning
3131
- 📊 Сложность: базовая
3232
- 📋 Необходимые знания: желательно [обзор LLM](/p/ai-basics-overview/)
33+
- **[Базовый минимум про ИИ – RAG-системы](/p/ai-basics-rag/)**
34+
- ⏱️ чтение ~6 мин · без видео
35+
- 📋 Зачем RAG, этапы пайплайна, чанкование, naive / advanced RAG; аккордеоны
36+
- 🏷️ RAG, retrieval, эмбеддинги, векторный индекс, чанкование, генерация с контекстом
37+
- 📊 Сложность: базовая
38+
- 📋 Необходимые знания: желательно [обзор LLM](/p/ai-basics-overview/)
3339

3440
## 👥 На их плечах
3541

blog/content/post/ai-basics-intro/index.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ image: cover.jpg
1212

1313
This is the first article in the “Bare minimum” series — a concise look at how AI works. Each piece will cover one idea or concept; I’ll try to keep them short and in order.
1414

15-
We’ll start with common terms; elsewhere in the series — [prompt engineering](/en/p/ai-basics-prompt-engineering/), RAG systems, and agents that can handle complex multi-step tasks.
15+
We’ll start with common terms; elsewhere in the series — [prompt engineering](/en/p/ai-basics-prompt-engineering/), [RAG systems](/en/p/ai-basics-rag/), and agents that can handle complex multi-step tasks.
1616

1717
**Video:** [Watch on YouTube](https://youtu.be/z9VBZn0XcVk)
1818

blog/content/post/ai-basics-intro/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ image: cover.jpg
1212

1313
Это первая статья из цикла «Базовый минимум» — коротко про то, как устроен ИИ. Каждая статья будет освещать одно понятие или концепцию, постараюсь делать их короткими и последовательными.
1414

15-
Начнём с общепринятых терминов; отдельно в цикле — [промпт-инжиниринг](/p/ai-basics-prompt-engineering/), RAG-системы и агенты, способные выполнять сложные многоступенчатые задачи.
15+
Начнём с общепринятых терминов; отдельно в цикле — [промпт-инжиниринг](/p/ai-basics-prompt-engineering/), [RAG-системы](/p/ai-basics-rag/) и агенты, способные выполнять сложные многоступенчатые задачи.
1616

1717
**Видео версия:** [Смотреть на YouTube](https://youtu.be/z9VBZn0XcVk)
1818

blog/content/post/ai-basics-overview/index.en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ This overview for the «Bare minimum» series is an outline:
140140
<li>Reducing hallucinations by grounding in verified facts</li>
141141
</ul>
142142

143+
<p>More on stages, chunking, and pipeline flavors: <a class="link" href="/en/p/ai-basics-rag/">AI basics – RAG systems</a>.</p>
144+
143145
<p><strong>Chain-of-thought</strong></p>
144146
<ul>
145147
<li>Step-by-step reasoning for hard problems</li>

blog/content/post/ai-basics-overview/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ image: cover.jpg
140140
<li>Уменьшение галлюцинаций через опору на проверенные факты</li>
141141
</ul>
142142

143+
<p>Подробнее про этапы, чанкование и типы пайплайнов: <a class="link" href="/p/ai-basics-rag/">Базовый минимум про ИИ – RAG-системы</a>.</p>
144+
143145
<p><strong>Chain-of-thought</strong></p>
144146
<ul>
145147
<li>Пошаговое рассуждение для решения сложных задач</li>
453 KB
Loading
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title: "AI basics – RAG systems"
3+
description: "RAG (Retrieval-Augmented Generation): why add retrieval to LLMs, pipeline stages, chunking, naive vs advanced RAG"
4+
date: "2026-03-25"
5+
slug: "ai-basics-rag"
6+
tags:
7+
- Artificial Intelligence
8+
- Machine Learning
9+
- База
10+
image: cover.jpg
11+
---
12+
13+
A «Bare minimum» article on **retrieval-augmented generation**: how to ground a language model in external documents and up-to-date knowledge.
14+
15+
### What RAG is {.toc-heading-only}
16+
17+
<details class="post-accordion">
18+
<summary style="cursor: pointer; font-weight: 600;">What RAG is</summary>
19+
<div style="margin-top: 0.75em;">
20+
21+
<p><strong>Retrieval-Augmented Generation</strong> means the model answers not only from weights learned at training time but also from <strong>fragments retrieved</strong> from an external store.</p>
22+
23+
<p><strong>The LLM-only issue:</strong> knowledge is largely <strong>static</strong> after training — the model does not automatically learn what happened next, <strong>does not self-update</strong>, and reflects the world <strong>as of the training cutoff</strong>. That is weak for fresh facts, internal playbooks, or a personal paper library.</p>
24+
25+
<ul>
26+
<li>RAG is the <strong>technology of wiring external sources</strong> into the generation step.</li>
27+
<li>It <strong>mitigates stale knowledge</strong> by pulling relevant chunks from a current corpus.</li>
28+
<li>The model is <strong>augmented with document context</strong>, not just pre-trained parameters.</li>
29+
</ul>
30+
31+
<p>RAG does not eliminate hallucinations, but it grounds answers in retrievable snippets that humans (or rules) can verify more easily.</p>
32+
33+
</div>
34+
</details>
35+
36+
### Stages of a RAG pipeline {.toc-heading-only}
37+
38+
<details class="post-accordion">
39+
<summary style="cursor: pointer; font-weight: 600;">Stages of a RAG pipeline</summary>
40+
<div style="margin-top: 0.75em;">
41+
42+
<p>Think of two phases: offline indexing and the online user query.</p>
43+
44+
<ul>
45+
<li><strong>Ingestion and chunking.</strong> Documents enter the system and are split into pieces sized for the index and the context window.</li>
46+
<li><strong>Vector index build.</strong> Each chunk gets an embedding; similarity search finds chunks “close” to the query in meaning.</li>
47+
<li><strong>Retrieval.</strong> For a user question, the system selects the most relevant chunks from the index.</li>
48+
<li><strong>Generation.</strong> Those chunks are placed in the prompt (with instructions and the question), and the LLM produces an answer conditioned on that context.</li>
49+
</ul>
50+
51+
<p>Concrete choices (embeddings, vector DB, how many chunks to inject) strongly affect quality, but the pattern <em>retrieve → inject → generate</em> stays the same.</p>
52+
53+
</div>
54+
</details>
55+
56+
### Chunking {.toc-heading-only}
57+
58+
<details class="post-accordion">
59+
<summary style="cursor: pointer; font-weight: 600;">Chunking</summary>
60+
<div style="margin-top: 0.75em;">
61+
62+
<p><strong>Chunking</strong> splits documents into smaller segments. Those segments are the <strong>basic units of indexing and search</strong> — what you embed and what you pass to the model.</p>
63+
64+
<ul>
65+
<li>The LLM sees <strong>fragments, not whole documents</strong> at once — full docs rarely fit the window, and search needs granular matches.</li>
66+
<li><strong>Chunk quality drives whether facts are reachable:</strong> split a coherent block in the wrong place and retrieval may miss it; make chunks huge and noise dilutes the signal.</li>
67+
</ul>
68+
69+
<p>In practice people tune chunk size, overlap between neighbors, and sometimes structure-aware splits (headings, paragraphs) instead of fixed character counts only.</p>
70+
71+
</div>
72+
</details>
73+
74+
### Types of RAG systems {.toc-heading-only}
75+
76+
<details class="post-accordion">
77+
<summary style="cursor: pointer; font-weight: 600;">Types of RAG systems</summary>
78+
<div style="margin-top: 0.75em;">
79+
80+
<p>People loosely contrast “naive” and “advanced” pipelines — the boundary is fuzzy, but the labels help navigate complexity.</p>
81+
82+
<ul>
83+
<li><strong>Naive RAG:</strong> query → nearest-chunk search → chunks go straight into the model <strong>without extra processing</strong>. Easy to ship; quality hinges on corpus, chunks, and embeddings.</li>
84+
<li><strong>Advanced RAG:</strong> adds steps around retrieval and generation: <strong>query rewriting or expansion</strong>, <strong>reranking</strong> with a cross-encoder or another model, <strong>deduplication</strong> of overlapping hits, sometimes metadata filters. Goal: sharper, cleaner context for the LLM.</li>
85+
</ul>
86+
87+
<p>For coursework or a research prototype, naive RAG is a common start; you add sophistication where you see failure modes like wrong paragraph, duplicates, or vocabulary mismatch between query and docs.</p>
88+
89+
</div>
90+
</details>
91+
92+
### Who uses it {.toc-heading-only}
93+
94+
<details class="post-accordion">
95+
<summary style="cursor: pointer; font-weight: 600;">Who uses it</summary>
96+
<div style="margin-top: 0.75em;">
97+
98+
<p>Teams adopt RAG when answers must be grounded in a <strong>chosen document set</strong> — internal, customer-facing, or personal — rather than only in the model’s training-time knowledge.</p>
99+
100+
<ul>
101+
<li><strong>Enterprises.</strong> Knowledge bases, policies, support playbooks: employees or customers ask questions, the system retrieves relevant snippets, and the model answers with reference to up-to-date org text.</li>
102+
<li><strong>Developers and product teams.</strong> Assistants over docs, wikis, tickets: less guessing about APIs from the open web — a controlled corpus sets the boundary.</li>
103+
<li><strong>Education and research.</strong> Working with a curated stack of papers, notes, and PDFs: ask questions over course materials or a literature review without replacing source checks.</li>
104+
<li><strong>Regulated or expert domains.</strong> Legal, clinical, finance, and similar settings where tying answers to company or regulatory text matters — always with human verification and data-access policies.</li>
105+
</ul>
106+
107+
</div>
108+
</details>

0 commit comments

Comments
 (0)