OpenViSTAI · Agents · Blockchain · Crypto
Menu
RAG & Knowledge Systems

Dotnet Rag Pgvector

Dotnet Rag Pgvector is an open-source C# application example for semantic search and retrieval-augmented question answering. It embeds a query, retrieves similar documents from PostgreSQL using pgvector and cosine similarity, then uses an Ollama or OpenAI language model to generate an answer. ASP.NET Core Minimal APIs expose the service, while .NET Aspire coordinates the API, database and Ollama components.

Independent OpenViST project profile, based on linked sources.

Dotnet Rag Pgvector — OpenViST project profile in RAG & Knowledge Systems.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it as a starting point or reference when building a .NET semantic-search or RAG API backed by PostgreSQL pgvector, especially when Aspire orchestration and provider choice are relevant.

Who it is for

  • .NET developers building or studying a semantic-search and RAG API.
  • Teams evaluating PostgreSQL pgvector with pluggable Ollama or OpenAI providers.
  • Developers who want an Aspire-orchestrated example with separated application, domain and infrastructure layers.

Documented uses

  • Retrieve documents relevant to a natural-language query using vector similarity.
  • Generate an answer using retrieved material and an LLM provider.
  • Explore an API-based RAG implementation built with .NET and PostgreSQL.
  • Switch the configured embedding and answer-generation provider between Ollama and OpenAI.
Before you choose

Requirements & limits

The public repository identifies the project as MIT-licensed and provides documented local setup prerequisites: .NET 10 SDK, Docker Desktop or Podman, and the .NET Aspire workload.

  • The showcased data-seeding example is an architecture-patterns dataset; the README does not describe a user-document ingestion procedure.
  • The README documents Ollama and OpenAI providers, but detailed setup for credentials and model availability depends on configuration outside the described steps.
  • PostgreSQL with pgvector is the implemented vector store; Pinecone and FAISS are listed as future extensions.
  • Hybrid search, HNSW indexing, streaming, evaluation and metadata filtering are described as future improvements, not current features.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Run the sample and open its API interface

Start the Aspire-hosted components and view the Scalar interface for the API.

Before you start

  • .NET 10 SDK
  • Docker Desktop or Podman; the README notes Aspire must be set to use Podman when applicable
  • The .NET Aspire workload

Steps

  1. Install the Aspire workload with dotnet workload install aspire.

  2. Run dotnet run --project AppHost from the project directory; the README says this starts PostgreSQL with pgvector, Ollama and the API.

  3. Open http://localhost:/scalar, substituting the API port shown for the running service.

Expected outcome

The README describes a running local application and its Scalar API UI.

Guide limitations

  • This guide covers startup and opening the API UI, not verifying a successful query or configuring external services.
  • The port is represented as a placeholder; the README does not give a fixed API port.
Source-based practical guide

Select the documented LLM provider in configuration

Choose Ollama or OpenAI as the configured provider for embeddings and answer generation.

Before you start

  • The project configuration in appsettings.json
  • For Ollama, the README’s example uses a base URL and embedding and chat model settings; for OpenAI, it shows an API-key field and embedding and chat model settings

Steps

  1. Open the AI configuration section in appsettings.json.

  2. Set AI.Provider to Ollama or OpenAI, as shown in the README.

  3. Review the selected provider’s base URL or API-key field and model settings in that same configuration section.

Expected outcome

The configuration identifies one of the two providers the README documents as supported.

Guide limitations

  • The README does not provide a full credential-provisioning procedure or confirm that a chosen model is available in a particular environment.
  • This guide documents configuration only; it does not test a provider or demonstrate a completed answer request.
COMPARE OPTIONS

Compare options for Retrieval-augmented applications

These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.

ProjectDocumented purposePlatformAccess and requirements
Dotnet Rag PgvectorRetrieve documents relevant to a natural-language query using vector similarity.Cloud, ServerThe public repository identifies the project as MIT-licensed and provides documented local setup prerequisites: .NET 10 SDK, Docker Desktop or Podman, and the .NET Aspire workload.
Rag Powered AI Assistant Transforming Data Retrieval And Analysis Across The Web And PdfsRetrieve relevant passages from web and PDF content to answer a question.Web
LangChain in Supabase Edge FunctionsInitialize and start a Supabase project locally.Cloud, Server
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 October 2026
Original website title
rineshpk/dotnet-rag-pgvector · Official homepage title · retained in its source language