Chat with your DB

Setup guide

Connery allows users to query databases in natural language, analyze data, and update records securely.

Plugins supporting this use case

  • postgreSQL

  • mySQL

What you can do with it

  1. Run Multi-Step Analyses: Drill-down into your data, step by step. Connery re-uses the context of prior results within the chat to review or refine analyses.

  2. Draw Insights Automatically: The AI interprets query results and suggests further analyses or improvements.

  3. Update Databases: Modify records directly with secure permissions and approval steps.

Important Notes

  • Data Structure and Quality: Any database request result can only be as good as the database itself. Connery's performance depends on the database structure and cleanness. Messy or incomplete data may lead to inaccurate results.

  • Permissions: Use read-only credentials for querying actions and restrict write access to authorized roles.

  • Scalability: Connery supports complex queries and updates but requires databases with clear relationships and indexed columns for optimal performance.

  • Auditability: All queries and updates are logged for transparency.

Action 1: Chat with Your Database

Purpose

Allows users to send database queries in natural language and retrieve results or insights. The action generates automatically a DB schema to obtain the context of available tables, fields, values and relations.

Setup Instructions

  1. Database Connection

    1. Use a connection string with read-only credentials.

  2. Action Parameters

    1. Predefined inputs

      1. Database Connection String: Your PostgreSQL database URL.

      2. Anthropic API Key: Required for generating SQL queries from natural language prompts.

      3. Maximum Rows: Set a limit on query results (default is 100).

      4. Instructions (Optional): Provide guidelines for response formatting or analyses.

    2. Guessed by AI

      1. Question: The natural language prompt for querying the database.

  3. Key Features

    1. Automatically generates and executes SQL queries.

    2. Provides the query result and the corresponding SQL for transparency.

Examples

  • Prompt: "Show the top 5 customers by order value over the past month."

  • Result: A table with customer names, total orders, and order value, plus the SQL query used.

Action 2: Update Specific Field of Record

Purpose

Enables users to update a specific field in a database record via predefined query templates.

Setup Instructions

  1. Database Connection

    1. Use a connection string with write permissions.

  2. Action Parameters

    1. Predefined inputs

      1. Connection String: Database URL with write access.

      2. Update Query Template: SQL template with {record_id} and {new_value} placeholders.

      3. Instructions (Optional): Add notes for processing the response.

    2. Guessed by AI

      1. Record ID: The unique identifier of the record to update.

      2. New Value: The value to replace in the specified field.

  3. Key Features

    1. Executes updates securely with a two-step process (automatically identifies parameters and asks users to confirm).

Example Usage:

Prompt: “Update the customer plan for Record ID 12345 to ‘Professional’.”

Result: Confirmation of the update, the modified record, and the executed SQL query.

Last updated