Skip to content

bculleec/Vector-Embeddings-Retrieval-in-Node.js

Repository files navigation

Vector-Embeddings-Retrieval-in-Node.js

Simple demo of how Vector Embeddings and Retrieval work in AI powered applications.

🚀 You can check out a working demo here: DEMO

What

Vector Embeddings are crucial to the way AI Systems remember things. You'll see in this demo how the computer is able to convert plain text into semantic groupings and find sections by ideas!

Why

The powerful building blocks of AI retrieval systems are simple, transparent and open to anyone. You should be aware of how these systems work and not be a blind user!

Setup

Clone this repo and find out how it works under the hood.

Clone the repo

git clone https://github.com/bculleec/Vector-Embeddings-Retrieval-in-Node.js
cd Vector-Embeddings-Retrieval-in-Node.js

Install dependencies

npm install

Add your text

Drop any .txt file inside the data/ directory.
The included example uses Alice in Wonderland, but you can replace it with anything you like.

Build vectors

node main.js

This runs your pipeline to chunk the text and create:

  • chunks.json → all the text chunks
  • vectors.json → vector representations of those chunks

Run the server

npm start

or

node server.js

This serves both the backend API and the frontend demo at http://localhost:3000.

About

Simple demo of how Vector Embeddings and Retrieval work in AI powered applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published