Advanced RAG

What is Advanced RAG?

Advanced RAG (Advanced Retrieval-Augmented Generation) is an evolutionary upgrade over the basic “Naive RAG” pipeline. It adds a suite of optimization techniques at every stage of the RAG workflow — pre-retrieval, retrieval, post-retrieval, and evaluation — to systematically improve retrieval precision, recall, and generation quality.

Naive RAG is like sending a junior intern to the library with a single, vague question, grabbing the first 5 books they find, and copying paragraphs directly. Advanced RAG is like sending a team of expert researchers who:

  • Rephrase the question in 5 different ways (Query Rewrite)
  • Write a fake “perfect answer” first to know exactly what to look for (HyDE)
  • Search both the card catalog AND the full-text index (Hybrid Search)
  • Have a senior editor re-rank the top results (Reranker)
  • Summarize and compress the findings before presenting them (Context Compression)
  • And finally, run a quality check on the entire process (Evaluation)

CN: 朴素 RAG 就像派一个初级实习生去图书馆,带着一个模糊的问题,抓起前5本书,直接抄段落。Advanced RAG 就像派一队专家研究员:

  • 把问题用5种不同方式重新表述(查询重写)
  • 先写一篇“完美的假答案”来明确要找什么(HyDE)
  • 同时搜索卡片目录和全文索引(混合检索)
  • 让高级编辑对结果重新排名(重排序器)
  • 在呈现之前总结和压缩发现(上下文压缩)
  • 最后对整个流程做质量检查(评估)

What does Advanced RAG include?

Layer 1: Chunking Strategies

Chunking 策略

ENCN
Recursive Chunking: Split text by paragraphs/sentences with overlap递归分块:按段落/句子分割,带重叠
Semantic Chunking: Split by semantic boundaries using embedding similarity语义分块:用嵌入相似度按语义边界分割
Parent-Child Retrieval: Retrieve child chunks, return parent chunks for context父子检索:检索子块,返回父块作为上下文

Layer 2:Retrieval Strategies

检索策略

ENCN
Hybrid Search: Combine dense (vector) + sparse (BM25) retrieval混合检索:结合稠密(向量)+ 稀疏(BM25)检索
RRF (Reciprocal Rank Fusion): Merge multi-strategy results by rankRRF(倒数排名融合):按排名位置合并多路结果
Vector DB Selection: Chroma, Pinecone, Milvus, Azure AI Search向量数据库选型:Chroma, Pinecone, Milvus, Azure AI Search

Layer 3: Post-Retrieval Optimization

检索后优化

ENCN
Reranker: Cross-encoder models to re-score retrieved documents重排序器:用交叉编码器模型重新给检索文档打分
Query Rewrite: Rephrase queries for better embedding alignment查询重写:改写查询以更好地对齐嵌入
HyDE: Generate hypothetical answer → embed that → retrieveHyDE:生成假设答案 → 嵌入假设答案 → 检索
Multi-Query Retrieval: Generate multiple query variants, search in parallel多查询检索:生成多个查询变体,并行搜索
Context Compression: Summarize or filter retrieved docs to fit context window上下文压缩:总结或过滤检索文档以适应上下文窗口

Layer 4: Evaluation

评估体系

ENCN
RAG Eval Metrics (ragas): Context Relevancy, Answer Relevancy, FaithfulnessRAG评估指标(ragas):上下文相关性、答案相关性、忠实度
Golden Dataset: Human-annotated Q&A pairs for regression testing黄金数据集:人工标注的问答对,用于回归测试

Advanced RAG differences from Naive RAG

维度ENCN
检索次数Naive: 1 single retrieval call. Advanced: Multiple parallel retrievals + reranking.朴素:单次检索调用。Advanced:多次并行检索 + 重排序。
查询处理Naive: Embed query directly. Advanced: Query Rewrite / HyDE / Multi-Query.朴素:直接嵌入查询。Advanced:查询重写 / HyDE / 多查询。
检索类型Naive: Vector search only. Advanced: Hybrid (Vector + BM25 + RRF).朴素:仅向量搜索。Advanced:混合(向量 + BM25 + RRF)。
排序Naive: Raw similarity scores. Advanced: Cross-encoder reranker (more accurate).朴素:原始相似度分数。Advanced:交叉编码器重排序器(更精确)。
分块Naive: Fixed-size chunking (e.g., 512 tokens). Advanced: Semantic / Parent-Child.朴素:固定大小分块(如512 token)。Advanced:语义 / 父子分块。
上下文窗口利用Naive: Dump all retrieved chunks into prompt. Advanced: Compress / filter / summarize.朴素:把所有检索块塞进提示词。Advanced:压缩 / 过滤 / 总结。
评估Naive: None or manual. Advanced: Automated Eval with ragas + Golden Dataset.朴素:无或手动。Advanced:用 ragas + 黄金数据集自动评估。
失败处理Naive: If retrieval fails, LLM hallucinates. Advanced: Query rewrite retries, multi-query fallback.朴素:检索失败则LLM幻觉。Advanced:查询重写重试、多查询降级。

Example: You’re building a customer support RAG for a cloud provider’s documentation.

阶段Naive RAGAdvanced RAG
用户查询“how fix 503 error”“how fix 503 error”
处理直接嵌入查询Query Rewrite → “how to troubleshoot HTTP 503 service unavailable error”, “503 error resolution steps”
检索向量搜索返回5个块,其中3个是关于”503″但不相关的(如负载均衡器通用文档)混合检索(BM25+向量) + RRF,返回15个候选
重排Cross-encoder reranker 重新打分,选出最相关的3个块
上下文5个块全部塞入(可能超过窗口)Context compression 总结每个块,只保留关键步骤
生成答案可能泛泛而谈答案精确指出: “检查service mesh sidecar, 重启x, 检查Y”

Reranker

What is Reranker?

 Reranker is a model that takes a set of candidate documents retrieved from an initial fast search and re-ranks them based on a more precise relevance assessment. It sits between the retriever and the LLM in a RAG pipeline.

Reranker 是一个模型,它接收从初始快速检索中获取的一组候选文档,并基于更精确的相关性评估对它们进行重新排序。在 RAG 流水线中,它位于检索器和 LLM 之间。

Imagine you’re a hiring manager. First, HR does a quick resume screening and gives you 100 candidates (this is the retriever). But HR’s screening is fast and imperfect—it might miss subtle but important qualifications. You then personally read the top 20 resumes in depth, carefully comparing each candidate against the job requirements. You reorder them, putting the best matches at the top. That’s you—the Reranker.

人话比喻: 想象你是一个招聘经理。首先,HR 快速筛选简历,给你 100 个候选人(这就是 检索器/Retriever)。但 HR 的筛选是快速且不完美的——可能会漏掉一些微妙但重要的资质。然后你亲自深入阅读前 20 份简历,仔细比较每个候选人与岗位要求的匹配度。你重新排序,把最匹配的放在最前面。你就是那个 Reranker。

 In a typical RAG pipeline, the first-stage retriever (usually vector search) quickly fetches top-k candidates from a massive database. However, vector search uses bi-encoder architecture—it encodes query and documents independently, then compares them with a single dot product or cosine similarity. This is fast but loses query-specific signal. The result is decent recall (the right doc is usually in top-20) but mediocre top-1 precision (the right doc is often not in top-1).

CN: 在典型的 RAG 流水线中,第一阶段的检索器(通常是向量检索)从海量数据库中快速获取 top-k 候选文档。然而,向量检索使用的是 双编码器(bi-encoder) 架构——它独立编码查询和文档,然后用一个点积或余弦相似度来比较它们。这很快,但会丢失查询特定的信号。结果是 召回率还行(正确的文档通常在 top-20 里),但 top-1 精确率 mediocre(正确的文档往往不在第一名)。

In 2026, rerankers have become standard in any RAG system that prioritises answer quality over absolute latency.

CN: 在 2026 年,reranker 已经成为任何优先考虑答案质量而非绝对延迟的 RAG 系统的标准组件

Reranker Core Content

Two-Stage Retrieval Architecture

Reranking operates within a two-stage pipeline commonly found in modern semantic search and recommendation engines.

CN: 重排序(Reranking)通常在現代语义搜索和推荐引擎中常见的两阶段流水线内运行。

StageComponentPurposeCharacteristics
Stage 1Retriever
检索器
Scan entire database, fetch top-k candidates (e.g., top 100)
扫描整个数据库,获取 top-k 候选(如 top 100)
Fast, prioritizes recall, uses ANN/vector search
快速,优先保证召回率,使用 ANN/向量检索
Stage 2Reranker
重排序器
Deep-analyze the candidate list, reorder by relevance
深度分析候选列表,按相关性重新排序
Slow but precise, prioritizes precision, uses cross-encoder
慢但精准,优先保证精确率,使用交叉编码器

Cross-Encoder vs Bi-Encoder

交叉编码器(Reranker)vs 双编码器(向量检索/检索器)

 This is the most important concept to understand about Reranker.

AspectBi-Encoder (Vector Search / Retriever)Cross-Encoder (Reranker)
Encoding
编码方式
Encodes query and document separately
查询和文档分别编码
Encodes query and document together as [query ⊕ doc]
查询和文档一起编码为 [query ⊕ doc]
Interaction交互方式No interaction between query and doc during encoding
编码时查询和文档无交互
Full cross-attention between query and doc tokens
查询和文档 token 之间完全交叉
OutputProduces embeddings (vectors), then compares via cosine/dot product
产生嵌入向量,然后通过余弦/点积比较
Produces a direct relevance score
产生直接的相关性分数
SpeedVery fast (can search millions in ms)
非常快(毫秒级搜索百万级)
Slow (O(k) forward passes per query)
慢(每个查询需要 O(k) 次前向传播)
PrecisionModerate—loses query-specific details
中等——丢失查询特定的细节
Highest—captures nuanced semantics
最高——捕捉细微的语义
Use caseFirst-stage retrieval (top-100)
第一阶段检索(top-100)
Second-stage reranking (top-100 → top-3/5)
第二阶段重排序(top-100 → top-3/5)

Reranker Workflow

  1. Query → Vector Database → Retrieve Top-K (e.g., top-100)
  2. Top-100 → Reranker → Score each (query, doc) pair → Reorder
  3. Top-N (e.g., top-3) → LLM → Generate Answer

Implementation

与向量检索集成的完整 RAG Pipeline

# ============================================================
# 完整的 RAG Pipeline:向量检索 + Reranker
# Complete RAG Pipeline: Vector Search + Reranker
# ============================================================

from typing import List, Tuple
import numpy as np


class RAGPipelineWithReranker:
    """
    Complete RAG pipeline with vector retrieval and reranker.
    包含向量检索和重排序器的完整 RAG 流水线。
    
    Architecture: Query → Vector Retriever (top-100) → Reranker (top-3) → LLM
    架构:查询 → 向量检索器 (top-100) → 重排序器 (top-3) → LLM
    """
    
    def __init__(self, 
                 vector_retriever,  # 向量检索器实例 / Vector retriever instance
                 reranker: RerankerEngine,  # 重排序器实例 / Reranker instance
                 llm_client):  # LLM 客户端 / LLM client
        """
        Initialize the RAG pipeline.
        初始化 RAG 流水线。
        """
        self.retriever = vector_retriever
        self.reranker = reranker
        self.llm = llm_client
        
    def query(self, question: str, retrieval_k: int = 100, rerank_top_n: int = 3) -> str:
        """
        Execute a full RAG query.
        执行完整的 RAG 查询。
        
        Args:
            question: User question / 用户问题
            retrieval_k: Number of documents to retrieve from vector DB / 从向量DB检索的文档数
            rerank_top_n: Number of documents to pass to LLM after reranking / 重排序后传给LLM的文档数
            
        Returns:
            Generated answer / 生成的答案
        """
        
        # 步骤1: 向量检索(快速,高召回)
        # Step 1: Vector retrieval (fast, high recall)
        # 从向量数据库中检索 top-K 候选文档
        # Retrieve top-K candidate documents from vector DB
        retrieved_docs = self.retriever.search(question, top_k=retrieval_k)
        # retrieved_docs 是 List[str] / retrieved_docs is List[str]
        
        # 步骤2: Reranker 精排(慢速,高精度)
        # Step 2: Reranker fine-ranking (slow, high precision)
        # 对检索结果进行重排序,只取 top-N
        # Rerank retrieval results, take only top-N
        reranked = self.reranker.rerank(question, retrieved_docs, top_k=rerank_top_n)
        # reranked 是 List[Tuple[str, float]] / reranked is List[Tuple[str, float]]
        
        # 提取重排序后的文档文本 / Extract reranked document texts
        top_docs = [doc for doc, _ in reranked]
        
        # 步骤3: 构建上下文并调用 LLM
        # Step 3: Build context and call LLM
        context = "\n\n".join(top_docs)
        prompt = f"""
        Based on the following context, answer the question.
        
        Context:
        {context}
        
        Question: {question}
        
        Answer:
        """
        
        # 调用 LLM 生成答案 / Call LLM to generate answer
        answer = self.llm.generate(prompt)
        
        return answer

Key Takeaways

要点ENCN
Reranker 是两阶段检索的第二阶段Reranker is the second stage in two-stage retrievalReranker 是两阶段检索中的第二阶段
Reranker 使用交叉编码器,查询和文档联合编码Reranker uses cross-encoder, query and doc encoded jointlyReranker 使用交叉编码器,查询和文档联合编码
向量检索(双编码器)优先保证召回率Vector search (bi-encoder) prioritizes recall向量检索(双编码器)优先保证召回率
Reranker(交叉编码器)优先保证精确率Reranker (cross-encoder) prioritizes precisionReranker(交叉编码器)优先保证精确率
经典模式:检索 top-100 → 重排序到 top-3Classic pattern: retrieve top-100 → rerank to top-3经典模式:检索 top-100 → 重排序到 top-3
Reranker 不替代向量检索,而是提升其精确率Reranker does not replace vector search; it boosts its precisionReranker 不替代向量检索,而是提升其精确率
BGE-Reranker 是开源的主流选择BGE-Reranker is a mainstream open-source choiceBGE-Reranker 是开源的主流选择
Cohere Rerank 是企业级的 API 服务Cohere Rerank is an enterprise-grade API serviceCohere Rerank 是企业级的 API 服务
Reranker 的代价是延迟和计算成本Reranker’s cost is latency and compute overheadReranker 的代价是延迟和计算成本
长文档自动分块,取最大分数Long documents are auto-chunked, take max score长文档自动分块,取最大分数

RAG 2.0

RAG (Retrieval-Augmented Generation) is an AI architecture that retrieves relevant information from external knowledge sources and provides it to an LLM, enabling the model to generate accurate, up-to-date, and context-aware responses.

LLM = Answer from Training
while
RAG = Search First + Then Answer

What is RAG 2.0? There is no official industry standard that defines “RAG 1.0”, “RAG 2.0”, or “RAG 3.0”.

The concept of “RAG 2.0”, known as Agentic RAG, represents a shift from a “simple data retrieval plugin” to a “deeply integrated, agentic system with reasoning capabilities.” The industry has indeed evolved from 1.0 and is now progressing toward 3.0.

Simplest Way to Remember

VersionMeaning
RAG 1.0Search Once
RAG 2.0Search + Reason
RAG 3.0
(coming ? on the way?)
Agent + Search + Tools + Workflow
RAG Foundation: Embedding

Embedding is a fundamental technology in machine learning and natural language processing that transforms discrete or complex objects (such as words, sentences, or images) into numerical vector representations of a fixed dimension

more …

RAG Foundation: RAG Pipeline

A simple RAG pipeline has two phases and five stages

  • Phase 1: Indexing (Offline / 离线阶段)
    Build the searchable knowledge base before users ask questions.
    离线阶段(索引):先把所有文档加载进来,切分成小块,调用 Embedding 模型转成向量,最后存进 FAISS 等向量数据库里。
  • Phase 2: Retrieval & Generation (Online / 在线阶段)
    Execute at query time for each user question.
    在线阶段(检索+生成):用户提问时,先把问题也转成向量,去库里找最相似的 Top-K 个块,把这几个块作为“参考资料”连同问题一起扔给 GPT,让它写出最终回答。

more …

In AI, a chunking strategy is the method used to break down large pieces of information—like long documents, complex prompts, or even audio and video—into smaller, more manageable segments called “chunks”. These chunks are the fundamental units that AI systems, especially Large Language Models (LLMs), work with to understand, process, and retrieve information efficiently.

Common Chunking Strategies

The best strategy depends on the type of data and the specific task. Here are the most common approaches:

StrategyDescriptionBest For
Fixed-Size ChunkingSplits text into chunks of a predetermined size (e.g., a specific number of words, characters, or tokens). Often uses a “sliding window” with overlap to preserve context across boundaries.Simple implementation; works well when document structure is uniform and not critical.
Semantic ChunkingGroups text based on meaning, using algorithms to find natural topic boundaries and keep related ideas together.Maintaining the coherence of ideas within each chunk for better understanding.
Structure-Aware ChunkingRespects the natural format of the document, splitting at points like paragraphs, sentences, or headers.Documents with clear structure (e.g., articles, reports, code) where breaking mid-section would lose meaning.
Recursive ChunkingStarts with large chunks and recursively splits them into smaller ones until they meet a target size, trying to respect natural boundaries like paragraphs or sentences.A balanced approach that aims to create the largest possible meaningful chunks.
Multimodal ChunkingExtends the concept to non-text data, such as segmenting audio by silences, video by scene changes, or identifying objects within images.AI systems that process images, audio, and video, not just text
Chunking Strategy: Recursive Chunking

Recursive Chunking is a hierarchical text splitting strategy that uses a priority list of separators (e.g., ["\n\n", "\n", " ", """]), starting with the highest-level (semantically strongest) separator. If a chunk still exceeds the chunk_size limit after splitting, it recursively applies the next-level separator to that chunk, continuing until all chunks meet the size requirement.

more …

Chunking Strategy: Semantic Chunking

Semantic Chunking is a strategy for splitting documents into smaller pieces (chunks) based on meaning, rather than on fixed character counts or simple separators. It tries to keep sentences or paragraphs that are about the same topic together, and split where the topic changes. Think of it as “a smart editor who knows where one idea ends and the next begins

more …

Chunking Strategy: Parent-Child Retrieval

Parent-Child Retrieval (also known as Small-to-Big Retrieval) is a two-tier hierarchical indexing strategy.

more …


Hybrid Search refers to a search technique that combines multiple search algorithms simultaneously to retrieve the most relevant results. It most commonly merges Lexical (Keyword) Search with Semantic (Vector/Dense) Search.
基于关键词的搜索(词汇搜索)与基于语义的搜索(向量/稠密搜索)

  1. Lexical Search (Sparse Retrieval): Typically powered by algorithms like BM25 or TF-IDF. It relies on exact keyword matching and statistical term frequency. It excels at finding specific proper nouns, IDs, or rare terminology (e.g., “error code 404”).
    词汇搜索(稀疏检索): 通常由 BM25 或 TF-IDF 等算法驱动。它依赖于精确的关键词匹配和统计词频。它在查找特定的专有名词、ID 或罕见术语时表现出色(例如:“错误代码 404”)。
  2. Semantic Search (Dense Retrieval): Powered by embedding models (e.g., Sentence-BERT). It converts text into high-dimensional vectors and retrieves documents based on “meaning” rather than exact words. It excels at understanding synonyms, context, and natural language queries (e.g., “How to fix a broken internet connection”).
    语义搜索(稠密检索): 由嵌入模型(如 Sentence-BERT)驱动。它将文本转换为高维向量,并根据“含义”而非精确词汇来检索文档。它在理解同义词、上下文和自然语言查询(例如:“如何修复断开的网络连接”)方面表现出色。
BM25 (keyword-based search)

BM25 (Best Matching 25) is a keyword-based ranking algorithm used in information retrieval to score and rank documents based on their relevance to a search query. It’s called “Best Matching 25” because it was the 25th variant in a series of scoring functions proposed by its creators. BM25 is the default ranking algorithm in Elasticsearch and most production search engines

more …

RRF

RRF stands for Reciprocal Rank Fusion. It is an algorithm that merges multiple ranked result lists from different search systems into a single unified ranking.
全称是 Reciprocal Rank Fusion(倒数排名融合)。它是一种将来自不同检索系统的多个排名结果列表合并成一个统一排名的算法.

more …

Vector Database Selection

Compare normal DB, such as SQL DB, MySQL, PostgreSQL, They fundamental difference is what they search for and how they find it. A traditional SQL database (like MySQL, PostgreSQL without pgvector) is built for exact matching and structured queries. It answers questions like: “Find the customer with ID = 12345” or “Give me all orders over $100.” A Vector Database is built for semantic similarity and unstructured data. It answers questions like: “Find all documents that talk about the same topic as this paragraph” or “Show me products that look visually similar to this image.”

Normal DB vs Vector DB

要点ENCN
核心:精确匹配 vs. 语义相似度Core: Exact matching vs. Semantic similarity核心:精确匹配 vs. 语义相似度
SQL存结构化数据(数字/字符串),Vector存浮点数数组(含义)SQL stores structured data (numbers/strings); Vector stores float arrays (meaning)SQL存结构化数据,Vector存浮点数数组(含义)
SQL查询用WHERE精确条件;Vector查询用ORDER BY距离SQL queries use WHERE exact conditions; Vector queries use ORDER BY distanceSQL查询用WHERE精确条件;Vector查询用ORDER BY距离
SQL用B-Tree/哈希(精确查找);Vector用HNSW/IVF(近似查找)SQL uses B-Tree/Hash (exact lookup); Vector uses HNSW/IVF (approximate)SQL用B-Tree/哈希(精确);Vector用HNSW/IVF(近似)
SQL结果是二元的(匹配/不匹配);Vector结果是排序的(相似度分数)SQL results are binary (match/no match); Vector results are ranked (similarity scores)SQL结果是二元的;Vector结果是排序的
SQL适合事务、财务报表;Vector适合RAG、推荐、AISQL suits transactions, ledgers; Vector suits RAG, recommendations, AISQL适合事务、报表;Vector适合RAG、推荐、AI
专用向量库不能做JOIN和ACID;但pgvector可以在PostgreSQL中兼得Dedicated vector DBs can’t do JOINs/ACID; pgvector lets you have both in PostgreSQL专用向量库不能做JOIN和ACID;pgvector可以让两者兼得
在实际RAG中,两者是互补的,不是替代关系In real-world RAG, they are complementary, not replacements在实际RAG中,两者是互补的,不是替代关系

Vector database selection is the process of choosing the right vector database technology for your AI application from dozens of available options — Milvus, Qdrant, Weaviate, Pinecone, pgvector, Chroma, and more.

Mainstream Vector Database Landscape

CategoryExamplesCN
Fully Managed (PaaS)Pinecone, Zilliz Cloud, Weaviate Cloud全托管云服务
Self-Hosted Open SourceQdrant, Milvus, Weaviate, Chroma自托管开源
Database Extensionspgvector, MongoDB Vector Search, Elasticsearch数据库扩展
Cloud Provider ServicesAzure AI Search, AWS S3 Vectors, Tencent Cloud VDB云厂商服务
Embedded/SpecializedSQLite (vector), LanceDB嵌入式/专用

Detailed Comparison

DatabaseAvg Query TimeCost (1M @ 1536-dim)Best ForCN 最适合
Milvus/Zilliz50.7ms$115/moFastest queries + good flexibility最快查询+灵活性好
Weaviate51.7ms$160/moNative datetime/geo + hybrid search原生时间/地理+混合检索
Qdrant73.1ms$103/moBest balance (speed + flexibility + cost)最佳平衡(速度+灵活性+成本)
Pinecone106.3ms$30/moCheapest (⚠️ poor schema flexibility)最便宜(⚠️ Schema灵活性差)
Chroma275.4ms$139/moEasiest setup + prototyping最简单设置+原型开发

7 Types of Data Stored in VectorDB in AI Projects

类型ENCN更新频率过滤器主要用途
RAG 文档块RAG Document ChunksRAG 文档块source, page问答
用户记忆 (Mem0)User Memory (Mem0)用户记忆 (Mem0)user_id个性化
工具 SchemaTool Schemas工具 Schematool_category工具选择
Agent 轨迹Agent TrajectoriesAgent 轨迹user_id, outcome经验复用
黄金数据集Golden Dataset黄金数据集category评估
语义缓存Semantic Cache语义缓存降本提速
代码索引Code Index代码索引language, path代码生成

Reranker is a sophisticated machine learning model designed to refine and reorder a list of candidate items—such as search results, document passages—to maximize their relevance to a specific query or context.

Reranker(重排序器)是一种复杂的机器学习模型,旨在优化并重新排序候选项目列表(如搜索结果、文档片段),以最大程度提高它们与特定查询或上下文的相关性。

Reranker

Reranker实战


Advanced RAG (Advanced Retrieval-Augmented Generation) is an evolutionary upgrade over the basic “Naive RAG” pipeline. It adds a suite of optimization techniques at every stage of the RAG workflow — pre-retrieval, retrieval, post-retrieval, and evaluation — to systematically improve retrieval precision, recall, and generation quality.

Advanced RAG

Query Rewrite

Multi Query Retrieval

Context Compression