Skip to content

Rebuild EF Core pgvector hybrid search sample - #28

Merged
balajibashyam merged 3 commits into
mainfrom
feature/hybrid-search-ef-core-pgvector-rebuild
Oct 1, 2026
Merged

balajibashyam merged 3 commits into
mainfrom
feature/hybrid-search-ef-core-pgvector-rebuild

Conversation

@balajibashyam

Copy link
Copy Markdown
Contributor

Summary

Replaces the existing minimal RRF-only Hybrid Search companion with the verified
.NET 10 implementation for
Hybrid Search in .NET with EF Core 10 and pgvector: Fuse Keyword + Vector Retrieval.

The existing GitHub path is preserved:

dotnet-ai/hybrid-search-ef-core-pgvector/

What's included

  • Rebuilt sample

    • ASP.NET Core Minimal API
    • EF Core 10
    • PostgreSQL full-text search
    • generated tsvector
    • GIN index
    • pgvector vector(768)
    • HNSW vector_cosine_ops
    • Microsoft.Extensions.AI.IEmbeddingGenerator
    • Ollama nomic-embed-text default path
    • document ingestion/chunking
    • normalized + transactional document replacement
    • keyword, vector, and hybrid modes
    • Reciprocal Rank Fusion
    • 13 deterministic tests
    • Docker Compose
    • local end-to-end verification script
  • Verification

    • .NET SDK 10.0.401
    • net10.0
    • Release build passed with 0 warnings / 0 errors
    • deterministic tests passed: 13/13
    • local PostgreSQL + pgvector live verification completed
    • local Ollama nomic-embed-text live verification completed
    • HTTP document ingestion verified
    • normalized document replacement verified
    • keyword retrieval verified
    • vector cosine retrieval verified
    • hybrid RRF retrieval verified
    • GIN index verified
    • HNSW vector_cosine_ops verified
    • stored vector dimension verified as 768
  • Root README

    • existing Hybrid Search row updated
    • run/build/test commands updated
    • repository structure updated
  • GitHub Actions

    • existing build-hybrid-search job updated for HybridSearch.slnx
    • deterministic tests added to CI
    • no Docker, Ollama, cloud credential, or live provider required

Package baseline

  • Microsoft.EntityFrameworkCore 10.0.12
  • Microsoft.EntityFrameworkCore.Design 10.0.12
  • Microsoft.EntityFrameworkCore.Relational 10.0.12
  • Npgsql.EntityFrameworkCore.PostgreSQL 10.0.3
  • Pgvector.EntityFrameworkCore 0.3.0
  • Microsoft.Extensions.AI 10.10.0
  • Microsoft.Extensions.AI.OpenAI 10.10.1
  • Azure.AI.OpenAI 2.1.0
  • OllamaSharp 5.5.0

Evidence boundary

The local live publication path used:

  • PostgreSQL/pgvector
  • Ollama
  • nomic-embed-text
  • 768-dimensional vectors

OpenAI and Azure OpenAI adapter examples are compile/construction verified only.
No live cloud embedding request is claimed.

Deliberately omitted

  • /api/ask
  • chat/answer generation
  • RAG prompting
  • reranking
  • authentication
  • multi-tenancy
  • dedicated vector databases
  • automatic provider failover
  • cloud live integration tests
  • deployment/IaC

Database boundary

EnsureCreatedAsync is retained for reproducible clean tutorial databases.
Production applications should use deliberate schema migration/deployment practices.

Independence

This is an independent educational sample and is not an official Microsoft,
PostgreSQL, pgvector, OpenAI, Azure, or Ollama sample or specification.

@balajibashyam
balajibashyam merged commit 136e96b into main Oct 1, 2026
28 checks passed
@balajibashyam
balajibashyam deleted the feature/hybrid-search-ef-core-pgvector-rebuild branch October 1, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant