Code Monkey home page Code Monkey logo

iota's Introduction

Iota logo

iota - a minimal local embedding database.

Motivation

This project was done with the aim of reproducing some of my favourite features from existing vector stores while maintaining minimalism and simplicity.

Important

This is by no means scalable, but should suffice for smaller projects.

Installation

Install the package via PyPI:

pip install iotadb

Usage

Here is a very simple example:

from iotadb import IotaDB, Document

# Define a list of documents
docs = [
    Document(text="That is a happy dog"),
    Document(text="That is a very happy person"),
    Document(text="Today is a sunny day")
]

# Create a collection
db = IotaDB()
db.create_collection(name="my_collection", documents=docs)

# Query documents within your collection
results = db.search("That is a happy person", return_similarities=True)

for doc, score in results:
    print(f"Text: {doc.text}")
    print(f"similarity: {score:.3f}\n")

More examples can be found in the /examples directory.

Features

  • Simple interface: Easy-to-use API for database operations.
  • Lightweight implementation: Minimal resource utilization.
  • Local storage: Stores embeddings locally for fast and retrieval.
  • Fast Indexing: Efficient embedding indexing for storage and retrieval.

Use cases

  • Query with Natural Language: Search for relevant documents using simple natural language queries.
  • Contextual Summarization: Integrate documents into LLM contexts like GPT-3 for data-augmented tasks.
  • Similarity Search: Find similar items/documents based on their embeddings.

Contributing

Interested in contributing? Head over to the Contribution Guide for more details.

iota's People

Contributors

timothyckl avatar

Stargazers

 avatar

Watchers

 avatar

iota's Issues

Token Chunk Management

Incorporate default chunk management techniques when document texts exceeds an embedding model's max sequence length.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.