redis-vl-dotnet

Examples

This section maps the main feature areas to runnable sample projects and the canonical Antora pages that explain each workflow.

Prerequisites

All current examples assume:

  • .NET 9 SDK

  • Redis Stack or another RediSearch-capable Redis deployment

  • REDIS_VL_REDIS_URL when Redis is not reachable at localhost:6379

Examples that use JSON storage also require RedisJSON. Provider-backed examples additionally require:

  • OPENAI_API_KEY

  • HF_TOKEN

  • COHERE_API_KEY

Coverage map

Feature area Antora entry point Example Runtime requirements

Core JSON workflows

Core Features

/examples/JsonStorageExample

RediSearch + RedisJSON. Supports REDIS_VL_REDIS_URL, REDIS_VL_REDIS_CLUSTER_NODES, or REDIS_VL_REDIS_SENTINEL_NODES plus REDIS_VL_REDIS_SENTINEL_SERVICE_NAME.

Core vector workflows

Core Features

/examples/VectorSearchExample

RediSearch with vector similarity support. Supports REDIS_VL_REDIS_URL.

Embeddings cache

EmbeddingsCache

/examples/EmbeddingsCacheExample

Basic Redis only. Supports REDIS_VL_REDIS_URL. Does not require RediSearch or provider credentials.

Message history and semantic retrieval

SemanticMessageHistory

/examples/MessageHistoryExample

RediSearch with vector similarity support. Supports REDIS_VL_REDIS_URL. Uses an in-process vectorizer, so no provider credentials are required.

Semantic cache

SemanticCache

/examples/SemanticCacheExample

RediSearch with vector similarity support. Supports REDIS_VL_REDIS_URL. No provider credentials required for the local sample flow.

Semantic router

SemanticRouter

/examples/SemanticRouterExample

RediSearch with vector similarity support. Supports REDIS_VL_REDIS_URL. Uses an in-process vectorizer, so no provider credentials are required.

OpenAI vectorization

OpenAI Vectorizer

/examples/OpenAiVectorizerExample

RediSearch with vector similarity support. Requires OPENAI_API_KEY. Optional OPENAI_EMBEDDING_MODEL, OPENAI_EMBEDDING_DIMENSIONS, and REDIS_VL_REDIS_URL.

Hugging Face vectorization

Hugging Face Vectorizer

/examples/HuggingFaceVectorizerExample

RediSearch with vector similarity support. Requires HF_TOKEN. Optional HF_EMBEDDING_MODEL and REDIS_VL_REDIS_URL.

Cohere reranking

Cohere Reranker

/examples/CohereRerankerExample

RediSearch + RedisJSON. Requires COHERE_API_KEY. Optional COHERE_RERANK_MODEL and REDIS_VL_REDIS_URL.

CLI workflows

CLI

dotnet run --project src/RedisVL.Cli — …​

Index commands require RediSearch plus --redis or REDIS_VL_REDIS_URL. JSON-backed index creation also requires RedisJSON. Schema commands run locally without Redis.

Build validation

Validate all example projects from the repository root:

npm run examples:build

This sweep is also used by CI so documented samples fail fast when they drift from the codebase.