{"repo":"nitaiaharoni1/vector-storage","free":true,"listed":false,"github":"https://github.com/nitaiaharoni1/vector-storage","clone":"git clone https://github.com/nitaiaharoni1/vector-storage.git","description":"Vector Storage is a vector database that enables semantic similarity searches on text documents in the browser's local storage. It uses OpenAI embeddings to convert documents into vectors and allows searching for similar documents based on cosine similarity.","language":"TypeScript","stars":246,"topics":["localstorage","semantic-search","vector-db","cosine-similarity","embedding-vectors","javascript","local-storage","lru-cache","npm","open-source"],"license":"MIT","category":"databases-storage","readme_excerpt":"Vector Storage Vector Storage is a lightweight and efficient vector database that stores document vectors in the browser's IndexedDB. This package allows you to perform semantic similarity searches on text documents using vector embeddings. Semantic search refers to the ability to understand the meaning and context of text documents and queries, enabling more accurate and relevant search results. Vector Storage leverages OpenAI embeddings to convert text documents into vectors and provides an interface for searching similar documents based on cosine similarity. Features - Store and manage document vectors in IndexedDB - Perform similarity searches on text documents - Filter search results based on metadata or text content - Automatically manage storage size and remove least recently used documents when space limit is reached Cosine Similarity Algorithm Cosine similarity is a measure of similarity between two non-zero vectors in an inner product space. It is defined as the cosine of the angle between the two vectors. The cosine similarity value ranges from -1 to 1, where 1 indicates complete similarity, 0 indicates no similarity, and -1 indicates complete dissimilarity. In this package, cosine similarity is used to measure the similarity between document vectors and the query vector. The cosine similarity score is calculated using the dot product of the vectors, divided by the product of their magnitudes. LRU Mechanism The Least Recently Used (LRU) mechanism is used to manage ","default_branch":null,"files":null,"tree":[],"storefront":"/r/nitaiaharoni1","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nitaiaharoni1/vector-storage/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}