Connect LlamaIndex to MyScale Databases
LlamaIndex reader that loads documents from MyScale vector database backends using query vectors and search parameters for semantic retrieval workflows.
Why it matters
Integrate your LlamaIndex applications with MyScale databases to efficiently retrieve and query vector data. This asset enables seamless data loading for advanced AI-powered applications.
Outcomes
What it gets done
Load data from MyScale using a query vector.
Configure MyScale connection parameters (host, credentials, database, table).
Specify index and search parameters for MyScale queries.
Utilize the reader as a tool within LangChain agents.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/li-reader-readers-myscale | bash Capabilities
What this skill does
Writes and executes SQL or NoSQL queries on databases.
Chunks, embeds, and indexes documents for semantic retrieval.
Pulls structured data fields from unstructured text.
Overview
LlamaIndex Readers Integration: Myscale
What it does
A LlamaIndex reader integration for loading data from MyScale vector database backends
How it connects
When you need to retrieve documents from MyScale using vector similarity search within LlamaIndex workflows
Source README
LlamaIndex Readers Integration: Myscale
Overview
MyScale Reader allows loading data from a MyScale backend. It constructs a query to retrieve documents based on a given query vector and additional search parameters.
Installation
You can install Myscale Reader via pip:
pip install llama-index-readers-myscale
Usage
from llama_index.readers.myscale import MyScaleReader
# Initialize MyScaleReader
reader = MyScaleReader(
myscale_host="<MyScale Host>", # MyScale host address
username="<Username>", # Username to login
password="<Password>", # Password to login
database="<Database Name>", # Database name (default: 'default')
table="<Table Name>", # Table name (default: 'llama_index')
index_type="<Index Type>", # Index type (default: "IVFLAT")
metric="<Metric>", # Metric to compute distance (default: 'cosine')
batch_size=32, # Batch size for inserting documents (default: 32)
index_params=None, # Index parameters for MyScale (default: None)
search_params=None, # Search parameters for MyScale query (default: None)
)
# Load data from MyScale
documents = reader.load_data(
query_vector=[0.1, 0.2, 0.3], # Query vector
where_str="<Where Condition>", # Where condition string (default: None)
limit=10, # Number of results to return (default: 10)
)
This loader is designed to be used as a way to load data into
LlamaIndex and/or subsequently
used as a Tool in a LangChain Agent.
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.