RAG & Vector Stores
The most common production AI pattern. Microsoft.Extensions.VectorData.Abstractions unifies the .NET vector-store story across providers. This subsection walks chunking, ingestion, every supported store, and hybrid search + rerank.
Topics (canonical order)
-
Microsoft.Extensions.VectorData
The unified abstraction,
IVectorStore,VectorStoreCollection, schema attributes -
Microsoft.Extensions.DataIngestion,SemanticSimilarityChunker, ingestion pipelines -
When to choose, hybrid search built-in, scaling
-
When to choose, payloads, filters, performance
-
Store: Azure SQL & Postgres pgvector
When relational fits, ACID + vectors together
-
DiskANN-based vector search in Cosmos NoSQL/Mongo
-
Dense + sparse + BM25, Cohere Rerank, reciprocal rank fusion
Why this order
Abstraction → ingestion (the hardest part) → 4 store implementations (decision-by-decision) → hybrid search + rerank (the quality multiplier). Most projects will pick exactly one store; the rest you read for selection rationale.
Cross-references
- Embeddings via IEmbeddingGenerator.
- Cosmos DB ties to NoSQL & Event Stores.
- End-to-end RAG case in Case: RAG App on .NET.