From 8b7cffc363158a65d76cfbc766bce0bd3c0f25de Mon Sep 17 00:00:00 2001 From: Leonid Ganeline Date: Thu, 25 Jul 2024 10:26:46 -0700 Subject: [PATCH] docs: `integrations` missed references (#24631) **Issue:** Several packages are not referenced in the `providers` pages. **Fix:** Added the missed references. Fixed the notebook formatting. --- .../docs/integrations/providers/cassandra.mdx | 15 ++++++++ docs/docs/integrations/providers/sklearn.mdx | 13 +++++++ docs/docs/integrations/providers/slack.mdx | 9 ++++- .../toolkits/cassandra_database.ipynb | 35 +++++++++---------- 4 files changed, 53 insertions(+), 19 deletions(-) diff --git a/docs/docs/integrations/providers/cassandra.mdx b/docs/docs/integrations/providers/cassandra.mdx index cbef4c693bc..0a29c393e1c 100644 --- a/docs/docs/integrations/providers/cassandra.mdx +++ b/docs/docs/integrations/providers/cassandra.mdx @@ -68,3 +68,18 @@ Learn more in the [example notebook](/docs/integrations/document_loaders/cassand > Apache Cassandra, Cassandra and Apache are either registered trademarks or trademarks of > the [Apache Software Foundation](http://www.apache.org/) in the United States and/or other countries. + +## Toolkit + +The `Cassandra Database toolkit` enables AI engineers to efficiently integrate agents +with Cassandra data. + +```python +from langchain_community.agent_toolkits.cassandra_database.toolkit import ( + CassandraDatabaseToolkit, +) +``` + +Learn more in the [example notebook](/docs/integrations/toolkits/cassandra_database). + + diff --git a/docs/docs/integrations/providers/sklearn.mdx b/docs/docs/integrations/providers/sklearn.mdx index ebb93942afc..a2d9e0554d7 100644 --- a/docs/docs/integrations/providers/sklearn.mdx +++ b/docs/docs/integrations/providers/sklearn.mdx @@ -20,3 +20,16 @@ from langchain_community.vectorstores import SKLearnVectorStore ``` For a more detailed walkthrough of the SKLearnVectorStore wrapper, see [this notebook](/docs/integrations/vectorstores/sklearn). + + +## Retriever + +`Support vector machines (SVMs)` are the supervised learning +methods used for classification, regression and outliers detection. + +See a [usage example](/docs/integrations/retrievers/svm). + +```python +from langchain_community.retrievers import SVMRetriever +``` + diff --git a/docs/docs/integrations/providers/slack.mdx b/docs/docs/integrations/providers/slack.mdx index d5d632dc74b..fe0790de71a 100644 --- a/docs/docs/integrations/providers/slack.mdx +++ b/docs/docs/integrations/providers/slack.mdx @@ -7,7 +7,6 @@ There isn't any special setup for it. - ## Document loader See a [usage example](/docs/integrations/document_loaders/slack). @@ -16,6 +15,14 @@ See a [usage example](/docs/integrations/document_loaders/slack). from langchain_community.document_loaders import SlackDirectoryLoader ``` +## Toolkit + +See a [usage example](/docs/integrations/toolkits/slack). + +```python +from langchain_community.agent_toolkits import SlackToolkit +``` + ## Chat loader See a [usage example](/docs/integrations/chat_loaders/slack). diff --git a/docs/docs/integrations/toolkits/cassandra_database.ipynb b/docs/docs/integrations/toolkits/cassandra_database.ipynb index 256952a9fe4..7d33d094719 100644 --- a/docs/docs/integrations/toolkits/cassandra_database.ipynb +++ b/docs/docs/integrations/toolkits/cassandra_database.ipynb @@ -6,23 +6,28 @@ "source": [ "# Cassandra Database\n", "\n", - "Apache Cassandra® is a widely used database for storing transactional application data. The introduction of functions and tooling in Large Language Models has opened up some exciting use cases for existing data in Generative AI applications. The Cassandra Database toolkit enables AI engineers to efficiently integrate Agents with Cassandra data, offering the following features: \n", - " - Fast data access through optimized queries. Most queries should run in single-digit ms or less. \n", - " - Schema introspection to enhance LLM reasoning capabilities \n", - " - Compatibility with various Cassandra deployments, including Apache Cassandra®, DataStax Enterprise™, and DataStax Astra™ \n", - " - Currently, the toolkit is limited to SELECT queries and schema introspection operations. (Safety first)\n", + ">`Apache Cassandra®` is a widely used database for storing transactional application data. The introduction of functions and >tooling in Large Language Models has opened up some exciting use cases for existing data in Generative AI applications. \n", + "\n", + ">The `Cassandra Database` toolkit enables AI engineers to integrate agents with Cassandra data efficiently, offering \n", + ">the following features: \n", + "> - Fast data access through optimized queries. Most queries should run in single-digit ms or less.\n", + "> - Schema introspection to enhance LLM reasoning capabilities\n", + "> - Compatibility with various Cassandra deployments, including Apache Cassandra®, DataStax Enterprise™, and DataStax Astra™\n", + "> - Currently, the toolkit is limited to SELECT queries and schema introspection operations. (Safety first)\n", + "\n", + "For more information on creating a Cassandra DB agent see the [CQL agent cookbook](https://github.com/langchain-ai/langchain/blob/master/cookbook/cql_agent.ipynb)\n", "\n", "## Quick Start\n", - " - Install the cassio library\n", + " - Install the `cassio` library\n", " - Set environment variables for the Cassandra database you are connecting to\n", - " - Initialize CassandraDatabase\n", - " - Pass the tools to your agent with toolkit.get_tools()\n", + " - Initialize `CassandraDatabase`\n", + " - Pass the tools to your agent with `toolkit.get_tools()`\n", " - Sit back and watch it do all your work for you\n", "\n", "## Theory of Operation\n", - "Cassandra Query Language (CQL) is the primary *human-centric* way of interacting with a Cassandra database. While offering some flexibility when generating queries, it requires knowledge of Cassandra data modeling best practices. LLM function calling gives an agent the ability to reason and then choose a tool to satisfy the request. Agents using LLMs should reason using Cassandra-specific logic when choosing the appropriate toolkit or chain of toolkits. This reduces the randomness introduced when LLMs are forced to provide a top-down solution. Do you want an LLM to have complete unfettered access to your database? Yeah. Probably not. To accomplish this, we provide a prompt for use when constructing questions for the agent: \n", "\n", - "```json\n", + "`Cassandra Query Language (CQL)` is the primary *human-centric* way of interacting with a Cassandra database. While offering some flexibility when generating queries, it requires knowledge of Cassandra data modeling best practices. LLM function calling gives an agent the ability to reason and then choose a tool to satisfy the request. Agents using LLMs should reason using Cassandra-specific logic when choosing the appropriate toolkit or chain of toolkits. This reduces the randomness introduced when LLMs are forced to provide a top-down solution. Do you want an LLM to have complete unfettered access to your database? Yeah. Probably not. To accomplish this, we provide a prompt for use when constructing questions for the agent: \n", + "\n", "You are an Apache Cassandra expert query analysis bot with the following features \n", "and rules:\n", " - You will take a question from the end user about finding specific \n", @@ -38,6 +43,7 @@ "\n", "The following is an example of a query path in JSON format:\n", "\n", + "```json\n", " {\n", " \"query_paths\": [\n", " {\n", @@ -448,13 +454,6 @@ "\n", "print(response[\"output\"])" ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "For a deepdive on creating a Cassandra DB agent see the [CQL agent cookbook](https://github.com/langchain-ai/langchain/blob/master/cookbook/cql_agent.ipynb)" - ] } ], "metadata": { @@ -473,7 +472,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.1" + "version": "3.10.12" } }, "nbformat": 4,