redis-vl-dotnet

Extensions

This section is the canonical overview for optional vectorizer and reranker packages.

Package layout

The repository keeps provider contracts and implementations outside the core package boundary:

  • src/RedisVL.Vectorizers.Abstractions for provider-agnostic text vectorizer contracts

  • src/RedisVL.Rerankers.Abstractions for provider-agnostic reranker contracts

  • src/RedisVL.Vectorizers.OpenAI for OpenAI embeddings

  • src/RedisVL.Vectorizers.HuggingFace for Hugging Face hf-inference embeddings

  • src/RedisVL.Rerankers.Cohere for Cohere reranking

Shared contracts

The current abstractions surface includes:

  • ITextVectorizer for single-input embedding generation

  • IBatchTextVectorizer for providers that can embed multiple inputs in one request

  • TextVectorizerExtensions.VectorizeManyAsync(…​) for batch-friendly fallback behavior

  • ITextReranker for query-plus-candidate reranking

  • RerankRequest, RerankDocument, and RerankResult for provider-neutral reranking payloads

The legacy RedisVL.Caches.ITextEmbeddingGenerator interface remains as an obsolete shim over ITextVectorizer for incremental migration.

Read the provider-neutral contract details here:

Provider packages

Use these package pages when you need constructor, environment, and example guidance:

Provider-backed examples

Use these examples when you want runnable package coverage:

  • /examples/OpenAiVectorizerExample requires OPENAI_API_KEY

  • /examples/HuggingFaceVectorizerExample requires HF_TOKEN

  • /examples/CohereRerankerExample requires COHERE_API_KEY

These examples show how the provider packages plug into higher-level workflows such as SemanticCache.

All three examples read credentials from environment variables and fail fast with an explicit message when the required provider credential is missing.

  • Examples for the full runnable sample map

  • Testing for provider-specific smoke-test gates