0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[1分でわかる]Advanced RAGってなんだ?

Posted at

結論

「Naive RAGの弱点を補強したRAG」

検索前・検索後に最適化処理を追加して、回答精度を向上させる手法群。


Naive RAGとの違い(1枚図解)

【Naive RAG】シンプルな検索→生成

  質問 → ベクトル検索 → チャンク取得 → LLM → 回答
  
  問題: 検索精度が低い、ノイズが多い


【Advanced RAG】検索前後に最適化を追加

  質問 
   ↓
  ┌─────────────────┐
  │ PRE-RETRIEVAL   │ ← ★追加
  │ ・クエリ書き換え │
  │ ・クエリ拡張     │
  └─────────────────┘
   ↓
  ベクトル検索(+ハイブリッド検索)
   ↓
  ┌─────────────────┐
  │ POST-RETRIEVAL  │ ← ★追加
  │ ・リランキング   │
  │ ・圧縮・フィルタ │
  └─────────────────┘
   ↓
  LLM → 回答

主要な改善テクニック

フェーズ テクニック 何をする?
Pre Query Rewriting 質問を検索しやすく書き換え
Pre HyDE 仮の回答を生成→それで検索
検索 Hybrid Search ベクトル+キーワード検索併用
Post Reranking 取得結果を関連度で並び替え
Post Context Compression 不要部分を削除して圧縮

何が改善された?

【Naive RAGの問題】        【Advanced RAGの解決】
───────────────────────────────────────────────
検索キーワードが曖昧    →  クエリ書き換えで明確化
無関係なチャンクが混入  →  リランキングで上位に絞る
コンテキストが長すぎる  →  圧縮して必要部分だけ
キーワード検索に弱い    →  ハイブリッド検索で補完

精度比較(目安)

Naive RAG:    50-70% 程度
Advanced RAG: 80-90% 程度(適切に実装した場合)

一言まとめ

Naive RAG    = 検索して渡すだけ
Advanced RAG = 検索の前後で磨き上げる

→ 「Rewrite → Retrieve → Rerank」が合言葉

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?