Minimal implementation of a local embedding database
Project description
iota - a minimal local embedding database.
Motivation
WIP
[!IMPORTANT] This project 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
iotadb-0.0.11.dev1.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for iotadb-0.0.11.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a09bb0cfb90ff18a048455822605fb5026c918453bcf66b67bf1d00cdfcc659 |
|
MD5 | 94b7fb653825095e5abd36c5319962aa |
|
BLAKE2b-256 | 98e65182701849fba9009cd408f9d7214927e149074e0c29cfd0db6674661ac5 |