Skip to main content

llama-index tools Apache Cassandra® integration

Project description

Cassandra Database Tools

Overview

The Cassandra Database Tools project is designed to help AI engineers efficiently integrate Large Language Models (LLMs) with Apache Cassandra® data. It facilitates optimized and safe interactions with Cassandra databases, supporting various deployments like Apache Cassandra®, DataStax Enterprise™, and DataStax Astra™.

Key Features

  • Fast Data Access: Optimized queries ensure most operations complete in milliseconds.
  • Schema Introspection: Enhances the reasoning capabilities of LLMs by providing detailed schema information.
  • Compatibility: Supports various Cassandra deployments, ensuring wide applicability.
  • Safety Measures: Limits operations to SELECT queries and schema introspection to prioritize data integrity.

Installation

Ensure your system has Python installed and proceed with the following installations via pip:

pip install python-dotenv cassio llama-index-tools-cassandra

Create a .env file for environmental variables related to Cassandra and Astra configurations, following the example structure provided in the notebook.

Environment Setup

  • For Cassandra: Configure CASSANDRA_CONTACT_POINTS, CASSANDRA_USERNAME, CASSANDRA_PASSWORD, and CASSANDRA_KEYSPACE.
  • For DataStax Astra: Set ASTRA_DB_APPLICATION_TOKEN, ASTRA_DB_DATABASE_ID, and ASTRA_DB_KEYSPACE.

How It Works

The toolkit leverages the Cassandra Query Language (CQL) and integrates with LLMs to provide an efficient query path determination for the user's requests, ensuring best practices for querying are followed. Using functions, the LLMs decision making can invoke the tool instead of designing custom queries. The result is faster and efficient access to Cassandra data for agents.

Tools Included

  • cassandra_db_schema: Fetches schema information, essential for the agent’s operation.
  • cassandra_db_select_table_data: Allows selection of data from a specific keyspace and table.
  • cassandra_db_query: An experimental tool that accepts fully formed query strings from the agent.

Example Usage

Initialize the CassandraDatabase and set up the agent with the tools provided. Query the database by interacting with the agent as shown in the example notebook.

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

llama_index_tools_cassandra-0.5.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

llama_index_tools_cassandra-0.5.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_tools_cassandra-0.5.0.tar.gz.

File metadata

  • Download URL: llama_index_tools_cassandra-0.5.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_cassandra-0.5.0.tar.gz
Algorithm Hash digest
SHA256 06bbce8c0742123b1aaa99a59d0bbe74051586a71999dca9a1dfc6bca6d70c73
MD5 172e6bd69d87dc85cd10949dd35cc911
BLAKE2b-256 3dc8cd9e99a5dbf0bbfdef62c34dbf704d3a5bf21c0c34864130920b0c61b59a

See more details on using hashes here.

File details

Details for the file llama_index_tools_cassandra-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_tools_cassandra-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_tools_cassandra-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e218862d935c769942f617d47c6316ed7312877ab26563e1c9b0d40e74fdbac
MD5 c48474889d6fe9fd71851b3384a74dc2
BLAKE2b-256 a75702b1fa4c101160ffc478339d1069e6bf5d87fe4226d989aae823ba3fc3f7

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