Skip to content

awesome-reactivesearch/knn-search-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

kNN Search with OpenAI

This repo contains files that can be used to setup a functional kNN search (indexing + querying) setup with ReactiveSearch and OpenSearch.

What are Pipelines?

Pipelines lets users define flows that are invoked based on paths. These flows can have custom stages (defined using JavaScript) or they can utilize pre built stages to override the default behaviour of a route.

In this example, we are utilizing pipelines to override the index and search endpoints to add an extra step that adds vector data based on a few fields and saves it to OpenSearch.

Auto Deployments

The pipelines are automatically deployed from this repository by using the pipelines-action which uses GitHub Actions to auto deploy the pipelines and does a lot more. Read here.

Index Pipeline

As explained above, an indexing pipeline is defined that automatically adds vector data for the Text and Summary fields and saves them as knn_vector in OpenSearch. These vectors are calculated using the OpenAI's Embedding API.

Read more about this pipeline in the index directory

Search Pipeline

The search pipeline is just an usual search pipeline with an extra step to inject the vector data.

Read more about this pipeline in the search directory

Frontend

The frontend of this app is built using ReactiveSearch components. These components are used with VueJS in this example.

Read more about the frontend in the frontend directory

About

KNN search UI with a dataset of Amazon reviews

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published