Introducing Morph's Vector Search API: Unveiling Powerful Search Capabilities Built on PostgreSQL

hero image

What is the Vector Search API?

Vector Search

Vector Search, in contrast to conventional searches dependent on keyword matching, operates on the principle of similarity in vector space. This distinctive approach facilitates a more nuanced and context-aware exploration of data. Users can transcend the limitations of exact matches and delve into discovering items with similar meanings or relationships. The merit of Vector Search is prominently showcased in its capacity to deliver highly accurate and relevant results, rooted in a profound understanding of the inherent relationships between data points. Embark on a revolutionary search experience with the precision and context offered by Vector Search technology. ‍

Morph’s Vector Search Function

Morph's Vector Search API is a robust tool that enables users to conduct effective vector searches. This functionality proves crucial in machine learning and data analysis, with applications spanning a variety of use cases. ‍

Setup

To leverage Morph's Vector Search API, the following steps are required:

  1. Registration for Team Plan: To initiate the use of the Vector Search API, you must register for the Team Plan. Currently you can get a two-week free trial period of the Team plan to test it out.‍
  2. Creating the API and Embedding via the Interface: Configure the Vector Search API by creating embeddings directly through the user interface. This facilitates the straightforward preparation of data for vector searches.

Similarity Search Similarity Search

Enabling Similarity Search:

  1. Create Source from Left Side Bar
  2. Click “Similarity Search”
  3. Click “Activate” button on where you want to setup vector search

Similarity Search Similarity Search

Developing API communication

To utilize the Vector Search API, integration with the API is necessary. The integration process is straightforward, allowing for easy implementation while referring to the documentation. This ensures a smooth and efficient search experience. ‍

Creating Data API:

  1. Click the button +Create > Data API > Query API
  2. Copy YOUR TEAM NAME for later use
  3. Copy YOUR API KEY for later use
  4. You can see API Reference from HERE

Similarity Search Similarity Search

Start Developing via API

In this sample code, we'll be using our proprietary SDK, @morphdb/morph-client. However, it's worth noting that our solution is not limited to just VanillaJS; it also seamlessly integrates with various other languages. For more details, please refer to the curl commands and API Reference.

Javascript Example:

Shell

TypeScript

About Embedding Operator Info

There are 3 types of operator used in Vector Search API. Here are the list of Embedding Operators:

Similarity Search

Use Cases

The Vector Search API boasts various use cases, but two, in particular, stand out:

  • Semantic Search:Going beyond mere text, this feature allows searches based on meaning and concepts resulting in more precise search outcomes.
  • Backend for RAG:Acting as the backend for Retrieval-Augmented Generation (RAG), it provides excellent search functionality for machine-generated content. For more about RAG,  please check the link below: https://research.ibm.com/blog/retrieval-augmented-generation-RAG

Summary

Morph's Vector Search API, with pgvector integrated into Neon, facilitates easy access to fully managed Vector Search based on PostgreSQL. ‍ Key advantages include:

  • Being PostgreSQL-based, it allows for flexible and advanced searches when combined with filtering and sorting.
  • Real-time updates of embeddings when editing source data via the interface, enabling swift and effective adaptation to changes.

Morph provides an ideal solution for users with advanced search requirement