Skip to main content

A simple vector database for fast similarity search

Project description

AttogradDB

A lightweight document based vector store for fast and efficient semantic retrieval. Lightning fast vector-based search for NoSQL and plaintext documents, embedded using BERT.

Version 0.3.1

Features

  • NoSQL Key Value Store
  • Plaintext document processing
  • Document Embedding
  • Customizable Vector Store
  • HNSW Indexing
  • Semantic search for NoSQL documents

Installation

pip package will be available in the upcoming release.

Clone source

git clone https://github.com/gouthamk16/AttogradDB.git

Setup and activate python virtual environment

cd AttogradDB
python -m venv .venv
source .venv/bin/activate

Build setup dependencies

pip install -e .

Usage

Examples can be found at AttogradDB/examples

Documentation

VectorStore

  • add_text(vector_id, input_data) Add a single vectorized text to the database.

  • add_documents(docs) Bulk-add a list of documents.

  • get_vector(vector_id, decode_results=False) Retrieve a stored vector by its ID.

  • get_similar(query_text, top_n=5, decode_results=True) Find top N similar vectors for a given query.

keyValueStore

  • add(data) Add a new dictionary to the JSON file.

  • search(key, value) Search for entries by a specific key-value pair.

  • toVector(indexing, embedding_model) Convert the key-value store data into a document stored in the vector database.

Embedding

BertEmbedding

  • Generates BERT-based embeddings for input text.

  • Supports reverse mapping from embeddings back to text.

Indexing

HNSW

  • Implements Hierarchical Navigable Small World indexing.

  • Provides efficient approximate nearest-neighbor search for large data.

Clustered Brute-Force

  • Implements brute-force search of clustered documents.

  • Lightspeed search for small to medium sized documents and NoSQL databases.

Roadmap

  • Add support for GPU-accelerated embedding generation and vector search using cuda.
  • C/Rust backend for similarity search and indexing.
  • Performance logging for HNSW indexing.
  • Publishing the library on PyPI.
  • Adding support for more embedding models and indexing methods.

Contributing

Contributions are welcome! If you encounter bugs or have feature requests, please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

attograddb-0.3.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

attogradDB-0.3.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file attograddb-0.3.1.tar.gz.

File metadata

  • Download URL: attograddb-0.3.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for attograddb-0.3.1.tar.gz
Algorithm Hash digest
SHA256 277503408b7d364d5c45a29ffcb8deccd5548c846ab369dd71ffb7de8fb7c9a8
MD5 6aab36624d6158eead7aabc1c2c6b4fe
BLAKE2b-256 ee7979eadb1bbf8bd85888662ff68eca35c26f00dc5792e4904d2d3ac24d3229

See more details on using hashes here.

File details

Details for the file attogradDB-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: attogradDB-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for attogradDB-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8591c0eb500aa9adb155a59a28294ea0862c9bc82b8064579d4d950fb45e1f7
MD5 2fcc15d80f62d22c9d598ac730242e83
BLAKE2b-256 6f8ed8df4aed2a573f3fe0233b450873ff428515448bfe515113e053313b2fe9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page