> For the complete documentation index, see [llms.txt](https://docs.karini.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.karini.ai/agentic-ai-workshops/partner-labs/teradata-agent-builder-workshop.md).

# Teradata Agent Builder Workshop

**Lab time:** about 60 to 75 minutes

## The Problem

A financial advisor needs to know which client portfolios hold a single stock above 30%, and whether that breaks FINRA concentration limits. Answering it takes two kinds of work: querying the portfolio database, which means knowing the tables and writing SQL, and reading through SEC and FINRA regulations to find the rule that applies. Usually that's two different people, and the advisor waits on both.

## What You Will Build

A Portfolio Advisor Assistant on Teradata Vantage: a copilot that answers portfolio and compliance questions in one conversation. Ask it a question and it will:

1. Find the relevant tables and columns in the portfolio database through a catalog
2. Run the query in Teradata through an MCP server, so the work happens where the data lives
3. Search SEC and FINRA compliance documents for the rules that apply
4. Combine both into one summarized answer with citations

## What You Will Learn

* Build a data catalog from a Teradata schema and generate business metadata for each table
* Connect an agent to Teradata through MCP (Model Context Protocol) to push query execution down to the database
* Combine structured data and a compliance knowledge base in a single agent
* Compare models side by side and inspect responses with Prompt Lens and traces
* Deploy the agent as a copilot with citations, follow-up questions, feedback, and traces

## Build Order

Build the catalog first, then the agent that uses it, then the recipe, and the copilot last.

| Step | You create                           | Contains                                                     |
| ---- | ------------------------------------ | ------------------------------------------------------------ |
| 1    | Catalog: Portfolio Catalog           | 3 imported Teradata tables with business metadata            |
| 2    | Agent prompt                         | 3 tools: Portfolio Catalog, Teradata MCP, Compliance Reports |
| 3    | Workflow recipe: Portfolio Advisor   | Chat, Start, Agent, End                                      |
| 4    | Copilot: Portfolio Advisor Assistant | Chat page for end users                                      |

## Before You Start

* Access to the Karini AI platform, through the invitation email
* Access to the Teradata catalog for client portfolios, with credentials provided separately
* Access to the Teradata MCP server, set up by your admin
* The **Portfolio Advisor** prompt template, available in Prompt Playground
* The **Compliance Reports** dataset, pre-populated with FINRA and SEC compliance documents

### Sign up for Karini AI

If you received an email invitation, follow the sign-up link in it and click **Sign Up**.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FT20OAt0kBNKVZiIQnLyy%2Fimage.png?alt=media&amp;token=8922a1e3-9338-4def-a9a2-51f663dc0fa8" alt=""><figcaption></figcaption></figure>

Fill in your **Full name** and a valid **Email**, click **Submit**, and follow the on-screen instructions to finish signing up. You can't sign up directly without an invitation email.

### Log in for the first time

The first time you log in, Karini AI shows a Setup Wizard. Click **Opt-Out** in the top right corner.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2Fa1J5xTWEvKi7X4YEXyhg%2Fimage.png?alt=media&amp;token=21bd03d3-9848-4689-8bcb-92fdc79fe8a4" alt=""><figcaption></figcaption></figure>

You're redirected to the Karini AI homepage, ready to start.

## Words You Will See

* **Catalog:** a description of a database's tables and columns that helps the agent find the right data
* **Business metadata:** plain-language descriptions of each table and column, generated so the agent understands what the data means
* **MCP:** Model Context Protocol, a standard way for an agent to call tools on another system. Here it runs queries inside Teradata.
* **Prompt template:** a ready-made prompt stored in Karini. You load it instead of typing it.
* **Tool:** something an agent can call, such as a catalog, an MCP server, or a knowledge base
* **Prompt Lens:** a view of the prompt and response details behind an answer
* **Trace:** a record of every tool the agent called, with its inputs and outputs
* **Recipe:** the workflow that connects everything on a canvas
* **Copilot:** the chat assistant end users open to use the recipe
* **Publish:** saves a version that recipes can use. Saved but unpublished changes are not used.

## Step 1: Create the Database Catalog <img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FkTgitsWFiBDvCWC8lWCD%2Funknown.png?alt=media&amp;token=abb196cb-c389-4278-a26e-a7e97e26f43c" alt="" data-size="line">

### 1.1 Create the catalog

1. Navigate to **Catalog Schema** using the vertical menu bar.
2. Click **Add new**.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FqAIYmKf2BOBLKcmgUcbc%2Fimage.png?alt=media&amp;token=22895c87-d645-486f-81a0-99b9ef4140da" alt=""><figcaption></figcaption></figure>

3. Configure the catalog:

| Field          | Value                                                                        |
| -------------- | ---------------------------------------------------------------------------- |
| Name           | Portfolio Catalog                                                            |
| Connector type | Teradata                                                                     |
| Credentials    | The credentials provided separately. Make sure to fill in the Database field |

4. Save the catalog, then open it.

### 1.2 Import the tables

1. Click **Browse schema**.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FoV2JYH1JKQL3tnvzp3YC%2Funknown.png?alt=media&amp;token=16059521-0897-412e-ab47-e6650cc6fe4b" alt=""><figcaption></figcaption></figure>

2. The View Schema panel opens with the Catalog Explorer. In the catalog hierarchy, expand **FAsuperuser** to see the available tables.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FCX3us218leOOADzkAXoe%2Funknown.png?alt=media&amp;token=5493e2bd-0373-4c3e-91fb-7315552165a3" alt=""><figcaption></figcaption></figure>

3. Select these three tables:

| Table                |
| -------------------- |
| transaction\_history |
| client\_profiles     |
| portfolio\_holdings  |

4. Click **Import selected schemas** on the right side of the screen.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2F6CUH3TgfYFh6ioVYj67Z%2Fimage.png?alt=media&amp;token=098b1677-326c-4023-97bd-0c66a65f6248" alt=""><figcaption></figcaption></figure>

### 1.3 Generate metadata and publish

1. Open the **Catalog Explorer** and, one table at a time:
   * Select the table.
   * Enable all checkboxes for metadata generation.
   * Click **Generate Metadata** on the right side.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2Fge9ncQPgayIMdwnwrJcC%2Fimage.png?alt=media&amp;token=95c6fcfa-7794-4aa4-ad37-d08bf9524d6f" alt=""><figcaption></figcaption></figure>

2. After all three tables have metadata, click **Publish** in the upper-right corner.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FHkSoitpReT6pdjwswrXg%2Funknown.png?alt=media&amp;token=793da83b-5288-4cbf-9e6c-d5e4b32f3a3a" alt=""><figcaption></figcaption></figure>

Once published, the catalog is ready to use as a tool in your agent prompt.

Refer to the following video to create the database catalog.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FkRiZEzcatWCu2OLtkzAL%2FCatalog%20video%20v2.mp4?alt=media&token=a1b9f39f-cefe-4555-8a35-745a99502035>" %}

## Step 2: Create the Agent Prompt <img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FnKGLQnqvu6MH1P40YeVL%2Funknown.png?alt=media&amp;token=e370feaf-1e0f-4115-92db-fa5223168c54" alt="" data-size="line">

### 2.1 Create the prompt

1. Navigate to **Prompt Playground** using the vertical menu bar.
2. Click **Add new**.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FDr2P36KfZyM3ZX1WLLg8%2Funknown.png?alt=media&amp;token=8c2a107d-6283-4cd7-a4b1-0f009c00e34a" alt=""><figcaption></figcaption></figure>

3. Click **Prompt templates**.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2F6lBLRGlRZcY3CVsRj07G%2Funknown.png?alt=media&amp;token=665a77d8-6f0b-40a7-aabc-4444de452c6b" alt=""><figcaption></figcaption></figure>

4. From the prompt templates table, select the **Portfolio Advisor** template.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2Fg9Peuqid1k0GaTtDQvUr%2Funknown.png?alt=media&amp;token=05d91c24-a044-4af5-8382-40f4b34cd746" alt=""><figcaption></figcaption></figure>

5. Click **Use template**.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FgrtPnKYj5Xwx64cbMMQy%2Fimage.png?alt=media&amp;token=36f46fd2-a1c7-47a1-90df-e2bd4fe80e53" alt=""><figcaption></figcaption></figure>

6. Increase **Max State Updates** from 3 to 50 for complex reasoning.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FxMPTK8Veo2HBfLHP3Yz6%2Funknown.png?alt=media&amp;token=10c9a01d-6226-460d-9218-a6e5e41f1930" alt=""><figcaption></figcaption></figure>

7. Scroll down to the **Agent input** box and add this test query:

```
How many clients have completed their KYC verification?
```

8. Scroll up and rename your prompt with your initials.
9. Save the prompt. You'll return to Prompt Playground; select your working prompt and open the **Tools** tab.

Save your changes before you navigate away to add tools, or they are lost.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FdI8H9vA0AaG5KVFUq432%2Funknown.png?alt=media&amp;token=e18e0aef-a3f5-47cb-9af2-279514ac67cf" alt=""><figcaption></figcaption></figure>

### 2.2 Add tool 1: Portfolio Catalog

1. Click **Add new** and fill in:

| Field       | Value                                                                                                        |
| ----------- | ------------------------------------------------------------------------------------------------------------ |
| Name        | Portfolio Catalog                                                                                            |
| Description | The catalog tool uses natural language questions to search relevant tables and columns to create a SQL query |
| Type        | Catalog                                                                                                      |
| Catalog     | The catalog you created in Step 1                                                                            |

2. Save the tool.

### 2.3 Add tool 2: Teradata MCP

1. Click **Add new** and fill in:

| Field       | Value                                                                               |
| ----------- | ----------------------------------------------------------------------------------- |
| Name        | Teradata MCP                                                                        |
| Description | MCP server providing tools to access Teradata database to push down query execution |
| Type        | MCP (Model Context Protocol)                                                        |
| MCP         | Teradata, created by your admin                                                     |

2. Save the tool.

### 2.4 Add tool 3: Compliance Reports

1. Click **Add New** and fill in:

| Field          | Value                                                                                             |
| -------------- | ------------------------------------------------------------------------------------------------- |
| Name           | Compliance Reports                                                                                |
| Description    | Retrieves compliance reports from a dataset.                                                      |
| Type           | Dataset                                                                                           |
| Dataset        | Compliance Reports, a vector knowledge base pre-populated with FINRA and SEC compliance documents |
| Prompt context | Use Embedding chunks                                                                              |
| Top-K          | 3                                                                                                 |

2. Save the tool. Your Tools tab now shows all three tools, and you're ready to test.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FWjjoWruFwHT2wEzSg6DH%2Funknown.png?alt=media&amp;token=98aac9e2-1248-4e21-a665-3a608b0aab05" alt=""><figcaption></figcaption></figure>

### 2.5 Test & Compare

1. Open the **Test & Compare** tab.
2. Select different models. Compare Bedrock Anthropic Claude Sonnet 3.7, Bedrock Anthropic Claude Sonnet 4.0, and Claude 3.5 Sonnet V2.
3. Click **Test**.
4. Wait for all three responses. While they run, the status shows Generating...

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2F4eL06iAGrLotHNglPp2Z%2Funknown.png?alt=media&amp;token=6f4d042d-d965-40bb-9c12-6138eeacea24" alt=""><figcaption></figcaption></figure>

When the responses are ready, each model shows three icons:

| Icon        | What it does                         |
| ----------- | ------------------------------------ |
| Copy        | Copies the response                  |
| Prompt Lens | Inspects the prompt and response     |
| Trace       | Shows each tool's inputs and outputs |

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2F67w0xzRO97SV9m1qph9j%2Funknown.png?alt=media&amp;token=7c692d08-868a-4761-9606-c1c9a4a2ffaa" alt=""><figcaption></figcaption></figure>

5. Click **Format Response** at the top to see the output in a structured format.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FQTAmIYnsa53fZWguQG88%2Fimage.png?alt=media&amp;token=0355e24a-551f-458f-bb73-237ff9567d58" alt=""><figcaption></figcaption></figure>

6. Review the traces to check which tools were invoked, with their inputs and outputs.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FDC66NjJV5hluTZOc3ZlV%2Funknown.png?alt=media&amp;token=a4858369-2b21-4548-9882-e20753dc4bf2" alt=""><figcaption></figcaption></figure>

7. Compare the outputs of the models. Look at response times, input and output tokens, and the traces.
8. Click **Select as Best Answer** on **Bedrock Anthropic Claude Sonnet 3.7** to set it as the Primary Model.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2F4M1d7XKaYZGheydekJNu%2Funknown.png?alt=media&amp;token=1a957320-9761-4f0c-977e-6dc1a96be4a6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FKEAuK42beUzEFjFSkHoz%2Funknown.png?alt=media&amp;token=b062b1bc-7c37-4e03-a2b3-f4229c841e36" alt=""><figcaption></figcaption></figure>

9. Click **Save prompt run** to save your experiment with comments.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FPR4nJt9oremMldsCc3Qg%2Funknown.png?alt=media&amp;token=5e0fdda1-6b59-4077-9623-0633808cc383" alt=""><figcaption></figcaption></figure>

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FA3sZ0WTGZf6nJZ8HjATt%2Funknown.png?alt=media&amp;token=f55b51f8-2e49-463a-b8af-af30a4e30744" alt=""><figcaption></figcaption></figure>

10. **Save** the prompt.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2F8hAYdXbhtzng253as4v2%2Funknown.png?alt=media&amp;token=a9f35ad4-5a0f-4d86-b7c6-e433fe0f29b8" alt=""><figcaption></figcaption></figure>

11. **Publish** the prompt. Once published, it's assigned a version number. Only published prompts are visible in the recipe.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FbT4YFalgiYTURZufrs5V%2Funknown.png?alt=media&amp;token=b161d296-7509-484c-8079-57bd6f40ec83" alt=""><figcaption></figcaption></figure>

Refer to the following video to create and test the agent prompt.

{% embed url="<https://www.loom.com/share/32dada3c41a9469fb806143d121589d5?sid=3c04ddb4-d228-4088-8430-0dd2a853ef33>" %}

## Step 3: Create a Workflow Recipe <img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2Fgy6wMIKLT5P14IHKamfn%2Funknown.png?alt=media&amp;token=8592f201-1ce6-4e86-8a3c-6394fbae8223" alt="" data-size="line">

### 3.1 Create the recipe

1. Navigate to **Recipe** in the vertical menu bar.
2. Click **Add new** in the top corner.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FNuoOJ2SidmJvWuYXEqRB%2Funknown.png?alt=media&amp;token=a9277108-fb91-4866-82c7-ca34cb99cda0" alt=""><figcaption></figcaption></figure>

3. Configure the recipe:

| Field       | Value                                       |
| ----------- | ------------------------------------------- |
| Name        | Portfolio Advisor                           |
| Description | Intelligent assistant for portfolio advisor |
| Type        | Workflow                                    |
| Runtime     | Karini                                      |

### 3.2 Add and connect the nodes

Drag each element onto the recipe canvas, then click it to configure it.

| # | Element | Settings                                                                      |
| - | ------- | ----------------------------------------------------------------------------- |
| 1 | Chat    | Conversation history 2 messages. Generate follow-up questions on. Citation on |
| 2 | Start   | None                                                                          |
| 3 | Agent   | Prompt = the agent prompt you created in Step 2. Messages = All Messages      |
| 4 | End     | None                                                                          |

Connect them in a straight line: Chat → Start → Agent → End.

### 3.3 Recipe settings, publish, and test

1. On the right side, set **Number of state updates** to a higher value, such as 75.
2. Click an empty space on the canvas, then click **Save**.
3. Select your recipe from the recipe table and click **Publish**.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FEIdKPNDSfPYgyvIS47mm%2Fimage.png?alt=media&amp;token=c959d60b-7eca-4792-ba3b-27c82441f115" alt=""><figcaption></figcaption></figure>

4. Add tags to categorize and identify the recipe version before publishing.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2F1pDunBUpLzdnjRv127Ka%2Fimage.png?alt=media&amp;token=c3eb6083-211c-4c04-b66b-d4b821f5e34c" alt=""><figcaption></figcaption></figure>

5. By default, the V1 version is deployed once it is published. For later versions, click **Actions** and select **Deploy**.
6. Click **Test** on the right side.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FJCjKwcv2jX1FCZs1YnYg%2Funknown.png?alt=media&amp;token=c619a2a1-4c9d-4215-a795-10727d0d5dcd" alt=""><figcaption></figcaption></figure>

7. A chat widget opens for your questions.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FJCjKwcv2jX1FCZs1YnYg%2Funknown.png?alt=media&amp;token=c619a2a1-4c9d-4215-a795-10727d0d5dcd" alt=""><figcaption></figcaption></figure>

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FqeZzFpHEs4rYLl64wRP1%2Fimage.png?alt=media&amp;token=1f5794f9-adeb-48f6-912b-da907e3f193e" alt=""><figcaption></figcaption></figure>

13. Chat widget will be displayed to enter the questions.
14. Try these questions:

| Question                                                                                            | What it exercises                               |
| --------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| How many clients have completed their KYC verification?                                             | Catalog and Teradata MCP                        |
| Which portfolios have any single stock position over 30%? Check against FINRA concentration limits. | Teradata MCP plus the compliance knowledge base |

Response times vary with the complexity of the question and data availability. Once the answer appears, you'll see:

| Element     | What it does                                     |
| ----------- | ------------------------------------------------ |
| Response    | The generated answer                             |
| Prompt Lens | The prompt details and response breakdown        |
| Trace       | The tools invoked, with their inputs and outputs |
| Statistics  | Response time, token usage, and timestamps       |

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2Faja3TCm7bVlDWL7l1Y1T%2Fimage.png?alt=media&amp;token=37a33011-185a-4eac-b110-d22a7157fd41" alt=""><figcaption></figcaption></figure>

14. Test with sample questions:
    1. How many clients have completed their KYC verification?
    2. Which portfolios have any single stock position over 30%? Check against FINRA concentration limits.
15. Wait for a few moments while the system processes the query. Response times may vary depending on the complexity of the question and data availability.

    Once the answer is displayed, the following options and details will be available:

    * **Response** :the generated response to your query.
    * **Prompt Lens** :view the prompt details and response breakdown.
    * **Trace**: inspect the tools invoked along with their input and output.
    * **Statics** : review metadata such as response time, token usage, and timestamps.

Refer to the following video to create and test the recipe.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FkfJ7qUkBsNHoL0GtWKjB%2FtERADATA%20recipe%20v2%20(2).mp4?alt=media&token=1b4ac419-8889-4b32-9716-33989236eddb>" %}

## Step 4: Create Your Copilot

Make sure you have **published** the recipe before you start this step.

1. Click the Action -> **Create copilot** button located at the top-right corner of your recipe.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FzxO2QysOdz6rSlhqr9r5%2Fimage.png?alt=media&amp;token=6282d2c3-f719-4082-8925-5cd52d78f109" alt=""><figcaption></figcaption></figure>

2. On the Copilots page, click **Add new**.

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2Fi8VA94eZQpKw237dbHFv%2Funknown.png?alt=media&amp;token=d77b8026-fcdb-4bf1-acb1-27e1e1c1f8f4" alt=""><figcaption></figcaption></figure>

3. Fill in the copilot details:

| Field           | Value                                                                                            |
| --------------- | ------------------------------------------------------------------------------------------------ |
| Copilot name    | Portfolio Advisor Assistant                                                                      |
| Welcome message | As preferred                                                                                     |
| Description     | The Portfolio Advisor Assistant is designed to help you analyze and understand clients portfolio |
| Seed questions  | See the list below                                                                               |
| Error message   | Apologies for the error, please try again                                                        |
| Feedback        | Thumbs up and thumbs down on. Optionally, custom feedback                                        |
| Show traces     | On                                                                                               |

Seed questions:

* How should investment advisers document “best interest” determinations under the SEC’s proposed Regulation Best Execution compared with FINRA Rule 5310?
* How many clients have completed their KYC verification?
* Which portfolios have any single stock position over 30%? Check against FINRA concentration limits.
* Are there any accounts with a single ticker representing over 20% of portfolio value? Validate concentration rules.

4. Click **Save**.

Open the copilot in one of two ways:

* **From the saved copilot:** click the **<** icon on the right panel, then click **Visit Copilot**

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FPQkywrATrEQzGW75CfgX%2Funknown.png?alt=media&amp;token=2fda73f6-ee6b-484e-aee1-7754b3835b71" alt=""><figcaption></figcaption></figure>

* **From the left menu** <img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FsH0miBL5wlqs53YPt5WM%2Fimage.png?alt=media&amp;token=e9df5ef9-64f1-4582-a24a-fd38e31c9d33" alt="" data-size="line">: open **Copilots** in the vertical menu

The copilot opens:

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FgaVKsAz0qqK6j1Ov8GZI%2Funknown.png?alt=media&amp;token=371d34b1-ece8-4643-a1b2-28f07b78c57e" alt=""><figcaption></figcaption></figure>

## Step 5: Test Your Portfolio Advisor Assistant

1. Click one of the seed questions.
2. Wait a few moments while the system processes the query. Response times vary with the complexity of the question.
3. Once the response is generated, you'll see:

| Element             | What it does                                                              |
| ------------------- | ------------------------------------------------------------------------- |
| Answer              | The system's response, as text or a table                                 |
| Citations           | The compliance sources referenced, so you can open the original documents |
| Follow-up questions | Suggested related questions to keep exploring                             |
| Trace               | The tools invoked, with their inputs and outputs                          |
| Prompt Lens         | The underlying prompt and response details                                |
| Copy                | Copies the answer for reuse                                               |
| Feedback            | Thumbs up or thumbs down on the response                                  |

<figure><img src="https://415930246-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FVQdUvOQJPUvlWYuf6y6R%2Funknown.png?alt=media&amp;token=14c016bc-c201-47ea-8559-347f62ecf37b" alt=""><figcaption></figcaption></figure>

Try each of the four seed questions. The KYC question draws on the portfolio database, the regulation question on the compliance documents, and the two concentration questions on both.

Refer to the following video for copilot functionality.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7ZrVuiAUMyuYVvrK5KaB%2Fuploads%2FSQaQUkESmupjvQdlBmaT%2Fcopilot%20teradata%20(2).mp4?alt=media&token=2fd281db-1233-4a13-90dc-544486fda20c>" %}

## <mark style="color:purple;">Congratulations, Now you are certified in Karini AI Generative AI Platform and Teradata, World's leading Analytics Platform</mark>
