Vector database sharding
Multimodal search
JaguarDB quantization
JaguarDB Vector API
Best Vector databases
JaguarDB in Docker
Setup JaguarDB with tar package
Setup JaguarDB on multiple nodes
Vector index sharing
How zeromove works
Video introduction
|
|
Examples
The following Python examples illustrate the integration of JaguarDB into AI applications for the benefit of software engineers and data scientists. In this demonstration, the focus lies on the seamless storage of textual data, image data, the creation of embeddings, and the execution of similarity searches within the text data corpus. The process entails identifying texts that closely correspond to a given query text. Notably, this operation is solely reliant on vector embeddings, rendering the inclusion of explicit keywords or search cues unnecessary. Images seaches focus on the labelling of an input image from pre-trained models.
| Example | Data | Models | Stack | Local LLM and RAG RAG with a local small LLM | Text | BAAI/bge-large-zh | Python | More Multi-Modal Searching with text or image | Image Text | clip-ViT-B-32 BAAI/bge-large-en | Python | RAG Model RAG Chat With LLM and JaguarDB | Text | gpt-4 | Python | Semantic Search Search similar texts | Text | BAAI bge-large-en | Python | Hybrid Search Similarity search and exact match | Text | BAAI bge-large-en | Python | Anomaly Search Detection of anomalous text | Text | BAAI bge-large-en | Python | Image Search Image similarity search | Image | clip-ViT-B-32 | Python | Proximity Search Similarity and location search | Text | BAAI bge-large-en | Python | Time Search Similarity and time search | Image | clip-ViT-B-32 | Python | Multimodal Search Multimodal search | Image | clip-ViT-B-32 | Python | OpenCLIP Model Embeddings in OpenCLIP | Image Text | ViT-B-32 laion2b_s34b | Python | AI Data Lake Storage of AI datalake | Image | ViT-B-32 laion2b_s34b | Python | ZeroMove Scaling Scaling with ZeroMove | Conf | Cluster | C++ |
JaguarLite
JaguarLite is a powerful, embedded vector database designed to run seamlessly on any Linux system without requiring server setup or external services. It is a streamlined version of JaguarDB, offering the full capabilities of a vector database in a compact, self-contained form factor ideal for edge devices, embedded AI systems, and local AI applications.
JaguarLite delivers 1) Standalone operation — no server process, no dependencies; 2) Full-featured vector search and indexing identical to JaguarDB; 3) Multi-tenant architecture — each tenant can be maintained by its own isolated databases and tables; 4) Flexible data support — including vector, time-series, and geospatial data.
JaguarLite can be easily installed with one command: curl -fsSL http://jaguardb.com/jaguarlite.sh|sh which will download the package and install all needed API and examples for developing your edge AI applications. Please visit https://github.com/fserv/jaguar-sdk/tree/main/jaguarlite for more details.
from jaguarlitepython import JaguarLite
''' Test simple data insert and select '''
def test_simple(db):
db.execute("create table t1( key: a int, value: b int )")
db.execute("insert into t1 values ('1', '100')")
db.execute("insert into t1 values ('2', '200')")
db.insert({"table": "t1", "a": "3", "b": "300"})
db.insert({"table": "t1"}, ['4', '400'])
db.insert({"table": "t1"}, ['5', '500'])
db.startQuery("select * from t1")
while db.read():
db.printRow()
jsonmsg = db.json()
print(f"{jsonmsg}")
if db.hasError():
print(f"error={db.error()}")
db.endQuery()
''' Test vector data insert and select '''
def test_vector(db):
db.execute("create store vec1 ( v vector(8, 'cosine_fraction_float'), v:text char(64) )")
db.execute("insert into vec1 values ('0.2, 0.3, 0.7, 0.03, 0.3, 0.41, 0.2, 0.3', 'apple') ")
db.execute("insert into vec1 values ('0.1, 0.3, 0.5, 0.23, 0.6, 0.51, 0.1, 0.1', 'pear') ")
db.execute("insert into vec1 values ('0.3, 0.4, 0.6, 0.63, 0.4, 0.61, 0.3, 0.5', 'orange') ")
db.startQuery("select similarity(v, '0.3, 0.4, 0.5, 0.3, 0.1, 0.5, 0.01, 0.2',
'topk=3,type=cosine_fraction_float') from vec1")
while db.read():
jsonmsg = db.json()
print(f"{jsonmsg}")
if db.hasError():
print(f"error={db.error()}")
db.endQuery()
if __name__ == '__main__':
#### create or use mydb of customer1
db1 = JaguarLite("mydb", "customer1")
test_simple(db1)
#### create or use vectordb of customer2
db2 = JaguarLite("myvectordb", "customer2")
test_vector(db2)
|