Introducing Vechord: Turn PostgreSQL into your search engine in a Pythonic way.
Today, we’re thrilled to announce the release of Vechord, a new Python library designed to dramatically simplify building robust search infrastructure directly on top of the PostgreSQL database.
In the rapidly evolving world of AI and large language models (LLMs), Retrieval-Augmented Generation (RAG) and semantic search have become crucial components. However, setting up the necessary vector search infrastructure often involves learning new database technologies, managing complex integrations, or wrestling with intricate frameworks. This adds friction and slows down development, especially for teams already comfortable with PostgreSQL.
The Challenge: Hybrid Search Complexity
Building search capabilities often means:
-
Choosing & Managing a Vector Database: Evaluating, deploying, and maintaining specialized vector databases (Pinecone, Weaviate, Milvus, etc.) and text search frameworks (ElasticSearch, Solr, etc.) adds operational overhead.
-
Complex Data Handling: Managing the synchronization between the source data and the vector representations.
-
Steep Learning Curves: Understanding the APIs and abstractions of comprehensive frameworks for a wide range of LLM tasks.
Vechord: The Simple, Pythonic Solution Built on Top of PostgreSQL
Vechord tackles these challenges head-on by leveraging the power and extensibility of PostgreSQL, enhanced with the powerful VectorChord and VectorChord-bm25 extensions. Our core philosophy is simplicity and focus.
Vechord provides a clean, Pythonic interface to:
-
Initialize: Easily configure the table schema with Python struct and annotations.
-
Ingest Data: Effortlessly add documents, PDFs, or any other type of data with transformation tools.
-
Perform Hybrid Search: Efficiently execute the vector similarity search and keyword search, and rerank the retrieval results with the user-friendly API.
-
Evaluate Metrics: Evaluate metrics seamlessly, either against ground truth or with LLM-based scoring.
-
Makes Simple Tasks Simple: offer an ORM-like interface to select, insert, and delete records from the PostgreSQL database.
How is Vechord Different?
-
Laser Focus on PostgreSQL Vector + Keyword Search: Vechord concentrates specifically on making the PostgreSQL + VectorChord-suite combination easy to use for search. If your primary goal is streamlined vector search and keyword search within your existing PostgreSQL ecosystem, Vechord offers a leaner, more direct path.
-
Library, Not a Full Platform: Vechord is designed as a library – a focused building block that you can integrate into your application code. It gives you the core storage and hybrid search capability on PostgreSQL, leaving the broader application architecture and workflow design entirely up to you.
-
Leveraging Existing Infrastructure: The core premise of Vechord is to empower teams already using PostgreSQL. You don’t need to introduce and manage a separate, dedicated vector database or document database if your scale and requirements are well-served by the VectorChord suite. This reduces operational complexity and cost.
-
Simplicity as a Feature: Vechord prioritizes a minimal API surface and ease of use for its specific task. Vechord aims to get you performing hybrid search on Postgres with minimal boilerplate and cognitive load.
Get Started with Vechord
- Define the table schema
- Inject the data with a Python decorator
- Run several steps in a transaction to guarantee data consistency
- Search by the vector and keyword, rerank with the cross-encoder model
Join the Community!
Vechord is open-source and community-driven. We believe it fills a vital gap for developers wanting powerful search capabilities without unnecessary complexity.
-
Check out the code on GitHub: https://github.com/tensorchord/vechord
-
Read the documentation: https://tensorchord.github.io/vechord/
-
Communicate with us on Discord: https://discord.gg/KqswhpVgdU
%[https://github.com/tensorchord/vechord]