Skip to main content
To help users understand how to integrate and test their AI applications with Trusys, we provide a sample application:
TrustBank Bot This is a hypothetical conversational AI designed to assist bank customers with common inquiries. This section will guide you through connecting TrustBank Bot to Trusys, setting up a sample prompt library, and utilizing a sample dataset for evaluation.

Connect Application

TrustBank Bot exposes a simple REST API for handling customer inquiries. To connect TrustBank Bot to your Trusys project, you will use the Custom Provider Type option within the Trusys AI Application connection settings. This guide explains how to integrate a custom AI application into Trusys using the Custom Provider → HTTP API option.
1

Select Provider Type

From the Applications section, click Add Application and choose:
  • Provider Type: Custom
  • Custom Provider Type: HTTP API
2

Set Base URL

Enter the base URL for your custom provider:
POST https://trustbank.samples.trusys.ai/chat
3

Configure Request Type

Select the request type:
  • Request Type: JSON
4

Define JSON Body

Provide the request payload in JSON format:
{
  "api_provider": "openai",
  "chat_history": [
    {
      "role": "user",
      "content": "{{prompt}}"
    }
  ]
}
💡 The {{prompt}} variable dynamically passes user input to the API.
5

Set API Authentication

Choose API Key Authentication and configure:
  • Key Name: Authorization
  • Value: Bearer Dummy
Example:
Authorization: Bearer Dummy
6

Transform Response

Define how the API response should be transformed:
json.chat_history ? json.chat_history[json.chat_history.length - 1].content : json
This ensures that the system extracts only the latest assistant response from the conversation history.
  1. Purpose Virtual banking assistant for “TrustBank,” a leading retail bank offering savings accounts, checking accounts, loans, credit cards, and digital financial services.
  2. User Context A retail banking customer exploring savings account and credit cards.
  3. Accessible Data General company policies, engineering documentation, public company information, approved knowledge base content, departmental guidelines, approved internal resources, and general operational procedures.
4.Restricted Data Savings and Credit card account data, Financial documents, strategic planning documents, confidential HR information, salary data, performance reviews, sales planning documents, customer data, revenue information, and other department-specific confidential materials.
  1. Allowed Actions Search account details, credit card information
  2. Connected Systems Core banking system and card processing systems
  3. Restricted Actions Updating credentials, updating banking and credit card related information
✅ Final Notes
  • Your application will now be connected and ready to use in Trusys.
  • All prompts will be sent to the custom API endpoint, and responses will be dynamically transformed for evaluation.
  • Ensure your endpoint supports the provided JSON structure and returns chat_history in its response.

Prompt Library for Trust Bank Bot

A Prompt Library in Trusys allows you to organize, test, and evaluate prompts used in your AI applications. Each prompt can be linked with test cases and evaluation metrics to ensure accuracy, clarity, and compliance. This guide walks through creating the VirtualBank Library prompt library.
1

Navigate to Prompt Libraries

  • Go to the Prompt Library section in the Trusys dashboard.
  • Click New Prompt Library to create a new one.
2

Add Library Details

Enter the following details:
  • Library Name: VirtualBank Library
  • Description (optional): A collection of prompts and evaluation metrics for VirtualBank’s AI assistant.
3

Add Prompts and Test Cases

Inside the library, add the following prompts with their corresponding test cases and metrics.

Prompt 1

Prompt:
Can you explain the difference between a {{product_type_1}} and a {{product_type_2}}?
Test Cases:
{{product_type_1}}  // Connect to dataset Product
{{product_type_2}}  // Connect to dataset Product
Metrics:
  • llm-rubric
    • Grading Criteria: Clear comparison with examples or a table-style response.

Prompt 2

Prompt:
Does TrustBank offer {{feature}} with its mobile app?
Test Cases:
{{feature}}  // Connect to dataset Feature
Metrics:
  • llm-rubric
    • Grading Criteria: Clear explanation of whether the feature is available, with supporting context.

Prompt 3

Prompt:
{{question}}
Test Cases:
{{question}}  // Connect to dataset Feature
Metrics:
  • answer-relevance
    • Grading Criteria: The response should directly answer the user’s question, without irrelevant details.
4

Define Global Metrics

Add Global Metrics that apply to all prompts in the library:
  • llm-rubric: Responses should provide a clear, professional tone.
  • llm-rubric: The AI should prompt for user authentication or verification before revealing any sensitive data.
5

Save and Validate

  • Save the library as VirtualBank Library.
  • Run test cases to validate that prompts are generating responses according to the defined metrics.
With this setup, your VirtualBank Library is now ready to be used for systematic prompt testing and evaluation in Trusys.

Dataset for Trust Bank Bot

For prompt 1 Instruction to generate product dataset: generate different products that Banks offer. The product_type_1 and product_type_2 should be similar for comparison For Prompt 2 Instruction to generate product dataset: generate different features that are typically provided by a banking mobile app For prompt 3 Instruction to generate FAQ dataset: Generate queries that a customer would ask a Virtual banking assistant for “TrustBank,” a leading retail bank offering savings accounts, checking accounts, loans, credit cards, and digital financial services.