Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt

Use this file to discover all available pages before exploring further.

A simple Amazon Redshift subject-matter expert agent that answers healthcare operations questions, runs SQL against Redshift, explains results in plain English, and helps users explore clinic appointment data without writing queries manually.

Tutorial Summary

  • Goal: Build an Amazon Redshift SME agent that can query healthcare appointment data and explain operational insights clearly.
  • Estimated Time: 10-15 minutes
  • What you’ll build: A Redshift-connected agent that understands your default workgroup, database, and schema context, answers healthcare operations questions, and summarizes results from the clinic appointments table.

Key Features

  • Native Amazon Redshift Integration
  • Natural-language Redshift Q&A
  • Business-friendly summaries with tables and takeaways

Prerequisites

  • xpander.ai account
  • AWS account
  • Amazon Redshift Serverless workgroup
  • AWS IAM credentials configured in xpander.ai
  • Active Redshift database
  • Healthcare appointment table created in Redshift

Step-by-Step Implementation

Step 1 - Create the Agent In xpander.ai, create a new agent and name it: Amazon Redshift Agent
Screenshot 2026 05 26 At 2 42 02 PM
This agent acts as a lightweight Redshift SME for answering healthcare operations questions over clinic appointment data. Step 2 - Connect Amazon Redshift Add the AWS Redshift connector and configure it with access to your Redshift Serverless workgroup or Redshift cluster. Use:
  • Region: <your-aws-region>
  • Authentication Method: IAM
  • cluster_name: <your-redshift-workgroup-or-cluster-name>
  • database_name: <your-redshift-database-name>
  • catalog_name: <your-redshift-schema-or-catalog-name>
Primary table:
<your-schema-or-catalog-name>.<your-table-name>
Step 3 - Add SME Instructions Use these instructions to make the agent respond like a business-focused Amazon Redshift SME:
You are an Amazon Redshift SME agent. Your job is to help users answer business questions using Redshift data. When answering:
  • Use the Redshift connection and context configured in the connector.
  • Infer the correct query when the user’s intent is clear.
  • Explain results in plain English.
  • Include a small result table when useful.
  • Add key takeaways.
  • Mention important caveats when relevant.

Example Questions

The agent ranks departments by average patient wait time:
Image
The agent compares no-show and cancellation patterns across departments:
Screenshot 2026 05 26 At 2 46 05 PM
The agent summarizes overall clinic appointment health by department:
Screenshot 2026 05 26 At 2 47 28 PM

Conclusion

In this tutorial, you built an Amazon Redshift SME Agent that connects to Redshift Serverless, understands a default workgroup, database, and schema context, and answers healthcare operations questions in plain English. The agent can analyze patient wait times, identify no-show and cancellation patterns, summarize department-level appointment health, and explain results with business-friendly takeaways. Although this example uses a small healthcare operations dataset, the same pattern can be extended to larger Redshift environments by adding more schemas, richer clinical operations rules, scheduling data, provider capacity data, and specialized instructions for different domains.

Troubleshooting

  1. Wrong region: Make sure the connector uses the same AWS region as the Redshift workgroup.
  2. Wrong workgroup name: Use the Redshift Serverless workgroup name in the connector’s cluster_name field.
  3. Missing database or schema context: Add the database_name and catalog_name values to the connector and agent instructions.
  4. Permission error: Grant the connector user access to the schema and table.
  5. Table not found: Check that the schema name, table name, and database name are correct.