Navigate to the Applications tab and click New Application to add your AI application or LLM model.
Application Details
Evaluation
Monitoring
Guardrails
Application Name – e.g., MyUniqueApp
Description (optional) – Adds clarity: “Streamlines project management by integrating task tracking, team collaboration, and progress reporting.”
Encrypt Output - When enabled, Trusys automatically encrypts any PII (Personally Identifiable Information) detected in AI responses. This prevents exposure of sensitive user data and helps ensure compliance with privacy and data protection regulations.
Recommended for applications handling user-generated content, customer data, or regulated information.
This section configures how Trusys runs functional and security evaluations on your AI application.Set up the appropriate connection to validate functional behavior, accuracy, and compliance using structured test runs before production use.To setup connections - select the type of your AI application you are working with,
LLM Model
Select Model – Pick your LLM from available options
Authentication – Supply credentials to securely connect
Voice / Call-based Application
Connect AI applications that interact with users over phone calls.
Provide the Phone Number associated with the AI-powered calling system
Trusys automatically captures and evaluates conversational interactions
Ideal for voice bots, IVR systems, and AI-powered customer support calls.
Agentic Application
Connect applications built using agentic AI frameworks.Supported Frameworks
Flowise
Langflow
Dify
Microsoft Foundry Agents
CrewAI
n8n
AWS Bedrock
Google Vertex
Salesforce Agentforce
Microsoft Copilot Studio
Configuration Steps
Select the agentic framework
Provide framework-specific authentication details
Configure connection parameters required by the selected framework
If your agentic framework is not listed, select Custom Agentic Application and follow the Custom AI Application flow.
This enables Trusys to:
Monitor multi-agent workflows
Evaluate agent decisions and outputs
Track security and functional risks across agent interactions
HTTP/HTTPS Application
Use this option when integrating an AI application that is not natively supported by Trusys or requires a custom request/response format.
Select the Custom Provider Type
Choose the Request Type(e.g., GET, POST)
Enter the Base URL of the application’s API.
Choose how to structure the request body sent to your API.
Raw JSON — Write the request body as a JSON string directly.
Key-Value Pairs — Add individual fields using a structured editor.
Raw HTTP requestThe request body can contain the following variables that Trusys will automatically populate:Text Prompt:{{prompt}} – The text prompt/input for the test caseAttachments (Optional):{{attachment1}} – First attachment (image, audio, video, document, etc.){{attachment2}} – Second attachment{{attachment3}} – Third attachment
Continue this pattern for additional attachments
Mandatory: The API request must contain at least the {{prompt}} variable, as Trusys passes all test cases through this placeholder. Without {{prompt}}, evaluations and monitoring will not function correctly.Optional: If your prompts include attachments, include the corresponding {{attachment1}}, {{attachment2}}, etc. placeholders in your request body. If attachments are not used in a test case, these placeholders will be empty or omitted depending on your API’s requirements.
Provide API authentication details for secure communication.
Define how to transform response data for compatibility with Trusys’s systems. Extract or reshape the API response before it reaches Trusys. If unset, Trusys parses the response as JSON, falling back to raw text.
Example 1: Simple JSON Path Extraction
For example, given this response from a chat completions endpoint:
{ "choices": [ { "message": { "role": "assistant", "content": "This is a test!" }, "finish_reason": "stop", "index": 0 } ]}
The below configuration of transform response extracts just the message content:
For applications that return streamed or event-based responses, you may need a custom function to extract the final output.For example, this is the response:
data: {"event":"token","data":{"content":"Hello"}}data: {"event":"complete","data":{"answer":"This is the final answer.","confidence":0.92}}
You can define a JavaScript transform response function like this:
(json, text) => { const line = text .split('\n') .find((l) => l.includes('"event":"complete"')); if (!line) { return ''; } const payload = JSON.parse(line.replace(/^data:\s*/, '')); return payload.data.answer || '';}
This extracts only the final answer from the stream.Output: This is the final answer.
If your application is a conversational AI (chat-based or multi-turn), Trusys requires conversation context to accurately evaluate conversational metrics. For HTTP-based applications, this context must be passed in the request body as a structured chat history.Chat History Format:
This ensures conversational context and media attachments are properly passed to your application for evaluation.
Custom Provider
Using Custom ProviderTo use a custom provider, you typically need to:
Develop your custom provider script: Write a JavaScript or Python file that implements the callApi function (or call_api for Python) to interact with your AI model or API. This function will receive the prompt generated by the Trusys platform as an argument. The code should submit this prompt to the AI application and return the output. Please see examples provided below.
Select the custom provider: When configuring the application, choose the language in which you have implemented the custom provider.
Choose Language: Python or JavaScript
4.1 Using CLI
4.2 Upload Code
Run the tests using CLI:** Run the evaluations using the CLI by providing the path to your custom provider file: Command-Line Usage.Below are examples of how to create a simple echo provider in both JavaScript and Python.
JavaScript Example (echoProvider.js)
Python Example (echoprovider.py)
This example demonstrates a simple JavaScript custom provider that echoes the input prompt.
This example demonstrates a simple Python custom provider that echoes the input prompt.
def call_api(prompt, options, context):"""Simple provider that echoes the prompt with a prefix."""config = options.get("config", {})prefix = config.get("prefix", "Echo: ")return { "output": f"{prefix}{prompt}"}
Upload your custom provider code as a ZIP file and have Trusys execute it. This method eliminates the need to run evaluations from your local CLI.Setup Steps
Upload ZIP File – Package your provider code and upload
Specify Application Path – Path to your handler file (e.g., src/provider.py or provider.js)
Add Environment Variables (optional) – Key-value pairs injected at runtime
Configure Transform Response (optional) – Extract specific fields from API responses
For Conversation-Based ApplicationsWhen your custom provider handles multi-turn conversations, Trusys automatically injects the full conversation history via the _conversation variable. Your provider must use this variable to maintain conversational context and enable accurate evaluation of conversational metrics._conversation contains the full conversation history up to the current turn. Your custom provider implementation must consume this variable to maintain conversational context.If _conversation is not passed or ignored, conversational metrics may be incomplete or inaccurate.
This section configures live production monitoring for your AI application.Trusys continuously analyzes real-time inputs and outputs to detect security risks, compliance violations, and performance issues using TRU PULSE.
1
Connect Application Logs
Select how you wish to connect your application logs to Trusys. This is crucial for data ingestion and analysis:
Folder Method
Input the folder path where your application logs are stored. Select the cloud provider (currently Azure and AWS are supported) and provide the necessary authentication details.
SDK Method
Select this option and choose an existing API key to save the configuration. This API key should be integrated into your application’s project to send logs directly to Trusys.
Python
Typescript
1. Install the SDKInstall openlit using pip:
pip install openlit
2. Set Environment VariablesConfigure the required environment variables for exporting telemetry data:
💡 Replace abc123 with your actual API key. Refer to the documentation on “How to Create an API Key” for more details.
💡 Replace xyz123 with your actual application ID of your application on trusys platform.
3. Import the SDKIn your application code, import the openlit SDK:
import openlit
4. Initialize the SDKInitialize openlit:
openlit.init()
1. Install the SDK
npm install openlit
2. Set Environment VariablesConfigure the required environment variables for exporting telemetry data:
💡 Replace abc123 with your actual API key. Refer to the documentation on “How to Create an API Key” for more details.
💡 Replace xyz123 with your actual application ID of your application on trusys platform.
3. Import the SDKIn your application code, import the openlit SDK:
import openlit from "Openlit"
4. Initialize the SDKInitialize Openlit:
Openlit.init();
This sets up observability and monitoring hooks automatically for your application.
OpenLIT Operator Integration
Trusys supports integration with the OpenLIT Operator, enabling seamless AI observability for your Kubernetes-based applications. This integration allows you to automatically instrument your AI workloads and send telemetry data to Trusys for comprehensive evaluation and monitoring.The OpenLIT Operator provides automated instrumentation for AI applications running in Kubernetes environments. It enables zero-code observability by automatically injecting OpenTelemetry instrumentation into your pods, capturing traces and metrics from LLM calls, AI frameworks, and vector databases without requiring any code modifications.
Replace your-trusys-endpoint and YOUR_TRUSYS_API_KEY with your actual Trusys monitoring endpoint and API key.
2
Define Collection Settings
Configure how Trusys collects data from your logs:
Sampling Frequency – Choose between percentage-wise or count-wise sampling.
Enter Percentage or Count – Specify the exact percentage of logs to sample (e.g., 10% of logs) or the number of logs to sample (e.g., 100 logs).
By default, sampling is performed and evaluated every hour.
3
Define Functional Monitoring Metrics
Select functional metrics against which you want to monitor your production logs and define their respective expected values. These metrics assess the performance and accuracy of your AI application in real-time.
4
Define Security Monitoring Metrics
Select vulnerable categories you wish to monitor for your application. This ensures continuous vigilance against potential security threats and compliance breaches.
Session Tracking for Conversational ApplicationsFor applications that maintain user sessions (such as chatbots, virtual assistants, or multi-turn conversational interfaces), implement session tracking to enable comprehensive evaluation and monitoring of complete user journeys.
Evaluation is performed on traces with the same application.id, and sessions are identified by grouping traces that share a session.id attribute. The end of a session is explicitly marked with the ended status.On every request:
from opentelemetry import tracespan = trace.get_current_span()span.set_attribute("session.id", "<user_session_id>")
On session end:
tracer = trace.get_tracer(__name__)with tracer.start_as_current_span("session.end") as span: span.set_attribute("session.id", "<user_session_id>") span.set_attribute("session.status", "ended")
Upon successfully enabling monitoring, you will begin to see traces from your application appear in the Traces section, detailed evaluation results for each log, and a Monitoring Dashboard providing an overview of your application’s health, functional metric evaluations, and security evaluations.
TRUGUARD allows you to define input and output guardrails for your application by combining validators with configurable enforcement actions. This ensures unsafe, non-compliant, or undesired content is handled consistently before it reaches end users or downstream systems.To configure TRUGUARD, users must first select one or more validators and define how the system should respond when a validation fails.
1
Select Validators
TRUGUARD currently supports the following validators:TruGuard provides a set of validators that can be applied to input and output guardrails. Each validator checks content for a specific type of risk, policy violation, or quality issue.
Input Guardrails – Applied before the model processes the request
Output Guardrails– Applied before the response is returned to the user
2
Configure On-Fail Actions
For every enabled validator, users must define an On-Fail Action. This determines what Trusys should do when a validation fails.Available On-Fail Actions
FIX – Clean the content :
Trusys replaces the detected PII with the corresponding entity type.
For example, John Doe → < PERSON >
Filter
Trusys replaces the unsafe portion with a safe alternative.
Mask
Trusys masks the unsafe portion.
Encrypt
Trusys encrypts the detected PII so it is not exposed in plaintext.
Fail
Trusys suppresses the response entirely to protect end users or the AI system.
Ignore but log the issue
The response is returned as-is, but the failure is logged for auditing and analysis.
3
Run Guardrails in Your Application
Once your guardrail configurations are set in the Trusys portal, running TruGuard in your application takes just three steps.
1
Install the TruGuard SDK
Install TruGuard like any other Python dependency:
pip install trusys
2
Set Credentials
TruGuard needs credentials to fetch guardrail configurations for your application.
Set the following environment variables:
These values are available in the Trusys portal under your application details.
3
Initialize TruGuard
This is the startup step that activates TruGuard.Call truguard.init() once when your application boots (for example, in main.py, app startup, or worker initialization).
from trusys import truguardtruguard.init()
What happens during initialization
TruGuard fetches input and output guardrail configurations from Trusys
Configurations are cached in memory
A background refresh loop keeps configs up to date
The Application List offers a centralized view of all AI applications and LLM models linked to your project. This list allows you to quickly access key information, including:
Functional Evaluations – Count of performance tests
Security Evaluations – Count of security audits
Production Monitoring – Indicates whether the app is currently monitored live
Clicking on a specific application within the Application List will take you to the Application Details page, offering an in-depth view of its configuration, evaluation results, and monitoring settings.
Access a comprehensive list of the functional and security evaluations performed on your application. This includes insights from TRU EVAL (functional performance, accuracy, etc.) and TRU SCOUT (security vulnerabilities, compliance adherence). Click on each test evaluation list to view the report and details of each test run.
This section displays all the parameters and credentials used to connect your AI application or LLM model to Trusys for both evaluation and continuous monitoring.
This part of the Application Details page outlines the specific configurations for live monitoring of your production application. It includes details such as:
Sampling Rates Frequency of data collection.
Monitored Metrics PII Leak, hallucination, and specific AI performance indicators.
Monitored Security Categories Hate speech, data leakage, adversarial attacks.
These settings ensure Trusys provides continuous, relevant insights into your application’s real-world performance and security posture.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"trusys Documentation","colors":{"primary":"#0040FF","light":"#0040FF","dark":"#7086FD"},"logo":{"light":"https://mintcdn.com/trusys/7mrr5sZer7ROLsws/logo/trusysLogo-a.svg?fit=max\u0026auto=format\u0026n=7mrr5sZer7ROLsws\u0026q=85\u0026s=a7ea07979de9ffd26fc81868d5281b13","dark":"https://mintcdn.com/trusys/7mrr5sZer7ROLsws/logo/trusysLogo-a.svg?fit=max\u0026auto=format\u0026n=7mrr5sZer7ROLsws\u0026q=85\u0026s=a7ea07979de9ffd26fc81868d5281b13"},"favicon":"https://mintcdn.com/trusys/nhRNsEfbKRyFwLXC/favicon.png?fit=max\u0026auto=format\u0026n=nhRNsEfbKRyFwLXC\u0026q=85\u0026s=a472f56a8d74ca4509ae92923f62e0e5","navbar":{"links":[{"href":"https://www.trusys.ai/contact","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://console.trusys.ai/"}},"footer":{"socials":{"x":"https://x.com/TrusysAI","github":"https://github.com/mintlify","linkedin":"https://www.linkedin.com/company/trusysai"}},"fonts":{"family":"DM Sans"},"styling":{"eyebrows":"breadcrumbs","latex":false},"contextual":{"options":["copy","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"Book a Demo","icon":"headset","href":"https://www.trusys.ai/demo"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"trusys","hasAudioNarration":false,"actualSubdomain":"trusys","customDomains":["docs.trusys.ai"],"gitSource":{"type":"github","owner":"spydra-tech","repo":"mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aacf201bfd3ae5d9be55bd5","collectionId":"ea400546-a585-407f-ab46-1c59a0281720","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aacf201bfd3ae5d9be55bd5"},"entitlements":{},"buildId":"6aacf201bfd3ae5d9be55bd5","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"📖 Product Guide","count":28},{"language":"default","tag":"\u003c/> APIs","count":19},{"language":"default","tag":"API reference","count":19},{"language":"default","tag":"📚 Core Concepts","count":11},{"language":"default","tag":"Feature \u0026 Tools","count":6},{"language":"default","tag":"Components","count":5},{"language":"default","tag":"Applications","count":5},{"language":"default","tag":"Workspace \u0026 Account","count":5},{"language":"default","tag":"Guardrails","count":5},{"language":"default","tag":"💻 Trusys MCP","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"product/applications","slug":"/product/applications","pageMetadata":{"title":"Application","icon":"grip","iconType":"light","description":null,"href":"/product/applications"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,blockquote:`blockquote`,br:`br`,code:`code`,em:`em`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,Check,CodeBlock,Heading,Step,Steps,Tab,Table,Tabs,Tip}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!Check)_missingMdxReference(`Check`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This section explains how to `,_jsx(_components.strong,{children:`connect`}),`, `,_jsx(_components.strong,{children:`review`}),`, and `,_jsx(_components.strong,{children:`monitor`}),` your AI applications and LLM models within the Trusys platform.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`1`,id:`connect-an-ai-application`,children:`Connect an AI Application`}),`\n`,_jsxs(_components.p,{children:[`Navigate to the `,_jsx(_components.strong,{children:`Applications`}),` tab and click `,_jsx(_components.strong,{children:`New Application`}),` to add your AI application or LLM model.`]}),`\n`,_jsx(Card,{children:_jsxs(Tabs,{children:[_jsx(Tab,{title:`Application Details`,icon:`1`,id:`application-details`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`Application Name`})}),` – e.g., MyUniqueApp`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`Description (optional)`})}),` – Adds clarity: `,_jsx(_components.em,{children:`“Streamlines project management by integrating task tracking, team collaboration, and progress reporting.”`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`Encrypt Output`})}),` - When enabled, Trusys automatically encrypts any PII (Personally Identifiable Information) detected in AI responses. This prevents exposure of sensitive user data and helps ensure compliance with privacy and data protection regulations.`,`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsx(_components.p,{children:`Recommended for applications handling user-generated content, customer data, or regulated information.`}),`\n`]}),`\n`]}),`\n`]})}),_jsxs(Tab,{title:`Evaluation`,icon:`2`,id:`evaluation`,\"data-child-tab-ids\":`[\"4-1-using-cli\",\"4-2-upload-code\"]`,\"data-child-heading-ids\":`[\"conversation-based-applications\",\"code-examples\"]`,children:[_jsxs(_components.p,{children:[`This section configures how Trusys runs `,_jsx(_components.strong,{children:`functional and security evaluations`}),` on your AI application.`]}),_jsx(_components.p,{children:`Set up the appropriate connection to validate functional behavior, accuracy, and compliance using structured test runs before production use.`}),_jsx(_components.p,{children:`To setup connections - select the type of your AI application you are working with,`}),_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`LLM Model`,id:`llm-model`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Select Model`}),` – Pick your LLM from available options`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Authentication`}),` – Supply credentials to securely connect`]}),`\n`]})}),_jsxs(Accordion,{title:`Voice / Call-based Application`,id:`voice-call-based-application`,children:[_jsxs(_components.p,{children:[`Connect AI applications that interact with users over `,_jsx(_components.strong,{children:`phone calls`}),`.`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Provide the `,_jsx(_components.strong,{children:`Phone Number`}),` associated with the AI-powered calling system`]}),`\n`,_jsx(_components.li,{children:`Trusys automatically captures and evaluates conversational interactions`}),`\n`]}),_jsx(Tip,{children:_jsx(_components.p,{children:`Ideal for voice bots, IVR systems, and AI-powered customer support calls.`})})]}),_jsxs(Accordion,{title:`Agentic Application`,id:`agentic-application`,children:[_jsxs(_components.p,{children:[`Connect applications built using `,_jsx(_components.strong,{children:`agentic AI frameworks`}),`.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Supported Frameworks`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Flowise`}),`\n`,_jsx(_components.li,{children:`Langflow`}),`\n`,_jsx(_components.li,{children:`Dify`}),`\n`,_jsx(_components.li,{children:`Microsoft Foundry Agents`}),`\n`,_jsx(_components.li,{children:`CrewAI`}),`\n`,_jsx(_components.li,{children:`n8n`}),`\n`,_jsx(_components.li,{children:`AWS Bedrock`}),`\n`,_jsx(_components.li,{children:`Google Vertex`}),`\n`,_jsx(_components.li,{children:`Salesforce Agentforce`}),`\n`,_jsx(_components.li,{children:`Microsoft Copilot Studio`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Configuration Steps`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Select the agentic framework`}),`\n`,_jsxs(_components.li,{children:[`Provide framework-specific `,_jsx(_components.strong,{children:`authentication details`})]}),`\n`,_jsx(_components.li,{children:`Configure connection parameters required by the selected framework`}),`\n`]}),_jsx(Check,{children:_jsxs(_components.p,{children:[`If your agentic framework is not listed, select `,_jsx(_components.strong,{children:`Custom Agentic Application`}),` and follow the `,_jsx(_components.strong,{children:`Custom AI Application`}),` flow.`]})}),_jsx(_components.p,{children:`This enables Trusys to:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Monitor multi-agent workflows`}),`\n`,_jsx(_components.li,{children:`Evaluate agent decisions and outputs`}),`\n`,_jsx(_components.li,{children:`Track security and functional risks across agent interactions`}),`\n`]})]}),_jsxs(Accordion,{title:`HTTP/HTTPS Application`,id:`http-https-application`,children:[_jsx(_components.p,{children:`Use this option when integrating an AI application that is not natively supported by Trusys or requires a custom request/response format.`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Select the `,_jsx(_components.code,{children:`Custom Provider Type`})]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Choose the `,_jsx(_components.code,{children:`Request Type`}),` `,_jsx(_components.em,{children:`(e.g., GET, POST)`})]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Enter the `,_jsx(_components.code,{children:`Base URL`}),` of the application’s API.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Choose how to structure the request body sent to your API.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Raw JSON`}),` — Write the request body as a JSON string directly.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Key-Value Pairs`}),` — Add individual fields using a structured editor.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Raw HTTP request`})}),`\n`,_jsx(_components.p,{children:`The request body can contain the following variables that Trusys will automatically populate:`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Text Prompt:`})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`{{prompt}}`}),` – The text prompt/input for the test case`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Attachments (Optional):`})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`{{attachment1}}`}),` – First attachment (image, audio, video, document, etc.)`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`{{attachment2}}`}),` – Second attachment`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`{{attachment3}}`}),` – Third attachment\nContinue this pattern for additional attachments`]}),`\n`,_jsxs(Check,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Mandatory:`}),` The API request must contain at least the `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`{{prompt}}`})}),` variable, as Trusys passes all test cases through this placeholder. Without `,_jsx(_components.code,{children:`{{prompt}}`}),`, evaluations and monitoring will not function correctly.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Optional:`}),` If your prompts include attachments, include the corresponding `,_jsx(_components.code,{children:`{{attachment1}}`}),`, `,_jsx(_components.code,{children:`{{attachment2}}`}),`, etc. placeholders in your request body. If attachments are not used in a test case, these placeholders will be empty or omitted depending on your API’s requirements.`]})]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example Request Body (with attachments):`})}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Raw JSON`,id:`raw-json`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{{prompt}}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{{attachment1}}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"audio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{{attachment2}}\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),_jsx(Accordion,{title:`Key-Value Pairs`,id:`key-value-pairs`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Key`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`message`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{{prompt}}`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`image`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{{attachment1}}`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`audio`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`{{attachment2}}`})})]})]})]})})]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Provide API `,_jsx(_components.code,{children:`authentication details`}),` for secure communication.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Define how to `,_jsx(_components.code,{children:`transform response`}),` data for compatibility with Trusys’s systems. Extract or reshape the API response before it reaches Trusys. If unset, Trusys parses the response as JSON, falling back to raw text.`]}),`\n`]}),`\n`]}),_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Example 1: Simple JSON Path Extraction`,id:`example-1-simple-json-path-extraction`,children:[_jsx(_components.p,{children:`For example, given this response from a chat completions endpoint:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`12`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"choices\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This is a test!\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finish_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stop\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`The below configuration of `,_jsx(_components.code,{children:`transform response`}),` extracts just the message content:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`providers:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - id: https`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` config:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` url: 'https:`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`//example.com/chat/completions'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` transformResponse: 'json.choices[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].message.content'`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Output:`}),` This is a test!`]})]}),_jsxs(Accordion,{title:`Example 2: Streamed/Event-Based Response`,id:`example-2-streamed-event-based-response`,children:[_jsx(_components.p,{children:`For applications that return streamed or event-based responses, you may need a custom function to extract the final output.`}),_jsx(_components.p,{children:`For example, this is the response:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"complete\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"answer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This is the final answer.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"confidence\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.92`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`You can define a JavaScript `,_jsx(_components.code,{children:`transform response`}),` function like this:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` line`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`split`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`find`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`((`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`l`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` l`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`includes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'\"event\":\"complete\"'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`line`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` payload`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`line`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`replace`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D16969`},children:`/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#DCDCAA`},children:`^`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D16969`},children:`data:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D16969`},children:`\\\\s`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`*`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D16969`},children:`/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` payload`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`answer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(_components.p,{children:`This extracts only the final answer from the stream.`}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Output:`}),` This is the final answer.`]})]})]}),_jsx(_components.hr,{}),_jsxs(Tip,{children:[`Prefer the command line? See the `,_jsx(_components.a,{href:`/product/command-line-usage`,children:`Command-Line Usage`}),` guide.`]}),_jsx(_components.hr,{}),_jsx(Heading,{level:`4`,id:`conversation-based-applications`,children:`Conversation-Based Applications`}),_jsx(_components.p,{children:`If your application is a conversational AI (chat-based or multi-turn), Trusys requires conversation context to accurately evaluate conversational metrics. For HTTP-based applications, this context must be passed in the request body as a structured chat history.`}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Chat History Format:`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`18`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"chat_history\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`%`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` for`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` completion`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` in`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` _conversation`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` %`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{{ completion.input }}\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{{ completion.output }}\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`%`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` endfor`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` %`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{{prompt}}\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`With Attachments:`})}),_jsx(_components.p,{children:`If your conversation includes attachments, include them in the request body:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`22`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`22`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"chat_history\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`%`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` for`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` completion`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` in`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` _conversation`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` %`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{{ completion.input }}\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{{ completion.output }}\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`%`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` endfor`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` %`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{{prompt}}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"attachments\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{{attachment1}}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{{attachment2}}\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(_components.p,{children:`This ensures conversational context and media attachments are properly passed to your application for evaluation.`})]}),_jsxs(Accordion,{title:`Custom Provider`,id:`custom-provider`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Using Custom Provider`})}),_jsx(_components.p,{children:`To use a custom provider, you typically need to:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Develop your custom provider script:`}),` Write a JavaScript or Python file that implements the `,_jsx(_components.code,{children:`callApi`}),` function (or `,_jsx(_components.code,{children:`call_api`}),` for Python) to interact with your AI model or API. This function will receive the prompt generated by the Trusys platform as an argument. The code should submit this prompt to the AI application and return the output. Please see examples provided below.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Select the custom provider:`}),` When configuring the application, choose the language in which you have implemented the custom provider.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Choose Language:`}),` Python or JavaScript`]}),`\n`]}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`4.1 Using CLI`,id:`4-1-using-cli`,\"data-child-tab-ids\":`[\"javascript-example-echoprovider-js\",\"python-example-echoprovider-py\"]`,children:[_jsxs(_components.p,{children:[`Run the tests using CLI:** Run the evaluations using the CLI by providing the path to your custom provider file: `,_jsx(_components.a,{href:`/product/command-line-usage#functional-evaluation`,children:`Command-Line Usage`}),`.`]}),_jsx(_components.p,{children:`Below are examples of how to create a simple echo provider in both JavaScript and Python.`}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`JavaScript Example (echoProvider.js)`,id:`javascript-example-echoprovider-js`,children:[_jsx(_components.p,{children:`This example demonstrates a simple JavaScript custom provider that echoes the input prompt.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` EchoProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'echo'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` callApi`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` output:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Echo: \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`prompt`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`module`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`exports`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` EchoProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`Python Example (echoprovider.py)`,id:`python-example-echoprovider-py`,children:[_jsx(_components.p,{children:`This example demonstrates a simple Python custom provider that echoes the input prompt.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` call_api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"\"Simple provider that echoes the prompt with a prefix.\"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` options.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"config\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {})`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`prefix `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` config.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"prefix\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Echo: \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"output\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`prefix`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`prompt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})]}),_jsxs(Tab,{title:`4.2 Upload Code`,id:`4-2-upload-code`,\"data-child-tab-ids\":`[\"javascript\",\"python\"]`,\"data-child-heading-ids\":`[\"code-examples\"]`,children:[_jsx(_components.p,{children:`Upload your custom provider code as a ZIP file and have Trusys execute it. This method eliminates the need to run evaluations from your local CLI.`}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Setup Steps`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Upload ZIP File`}),` – Package your provider code and upload`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Specify Application Path`}),` – Path to your handler file (e.g., `,_jsx(_components.code,{children:`src/provider.py`}),` or `,_jsx(_components.code,{children:`provider.js`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Add Environment Variables (optional)`}),` – Key-value pairs injected at runtime`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Configure Transform Response (optional)`}),` – Extract specific fields from API responses`]}),`\n`]}),_jsx(Heading,{level:`2`,id:`code-examples`,children:`Code Examples`}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`JavaScript`,id:`javascript`,children:[_jsxs(_components.p,{children:[`Create a file with a synchronous `,_jsx(_components.code,{children:`callApi`}),` function:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` callApi`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` callYourAPI`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`output:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`module`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`exports`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` callApi`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`For dependencies:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Create `,_jsx(_components.code,{children:`package.json`}),` with your dependencies`]}),`\n`,_jsxs(_components.li,{children:[`Run `,_jsx(_components.code,{children:`npm install`}),` locally`]}),`\n`,_jsxs(_components.li,{children:[`Include the `,_jsx(_components.code,{children:`node_modules/`}),` directory in your ZIP file`]}),`\n`]})]}),_jsxs(Tab,{title:`Python`,id:`python`,children:[_jsxs(_components.p,{children:[`Create a file with a `,_jsx(_components.code,{children:`call_api`}),` function:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` call_api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`options`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` api_key `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` call_your_api(prompt, api_key)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"output\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: response }`})]}),`\n`]})})})]})]})]})]}),_jsxs(Card,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`For Conversation-Based Applications`})}),_jsxs(_components.p,{children:[`When your custom provider handles multi-turn conversations, Trusys automatically injects the full conversation history via the `,_jsx(_components.code,{children:`_conversation`}),` variable. Your provider must use this variable to maintain conversational context and enable accurate evaluation of conversational metrics.`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`_conversation`}),` contains the full conversation history up to the current turn. Your custom provider implementation must consume this variable to maintain conversational context.`]}),_jsxs(_components.p,{children:[`If `,_jsx(_components.code,{children:`_conversation`}),` is not passed or ignored, conversational metrics may be incomplete or inaccurate.`]})]})]})]})]}),_jsxs(Tab,{title:`Monitoring`,icon:`3`,id:`monitoring`,\"data-child-tab-ids\":`[\"python-2\",\"typescript\"]`,\"data-child-heading-ids\":`[\"getting-started\",\"prerequisites\",\"configuration-steps\",\"example-configuration\"]`,children:[_jsxs(_components.p,{children:[`This section configures `,_jsx(_components.strong,{children:`live production monitoring`}),` for your AI application.`]}),_jsx(_components.p,{children:`Trusys continuously analyzes real-time inputs and outputs to detect security risks, compliance violations, and performance issues using TRU PULSE.`}),_jsxs(Steps,{children:[_jsxs(Step,{title:` Connect Application Logs`,children:[_jsx(_components.p,{children:`Select how you wish to connect your application logs to Trusys. This is crucial for data ingestion and analysis:`}),_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Folder Method`,id:`folder-method`,children:_jsx(_components.p,{children:`Input the folder path where your application logs are stored. Select the cloud provider (currently Azure and AWS are supported) and provide the necessary authentication details.`})}),_jsxs(Accordion,{title:`SDK Method`,id:`sdk-method`,children:[_jsx(_components.p,{children:`Select this option and choose an existing API key to save the configuration. This API key should be integrated into your application’s project to send logs directly to Trusys.`}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Python`,id:`python-2`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`1. Install the SDK`})}),_jsxs(_components.p,{children:[`Install `,_jsx(_components.code,{children:`openlit`}),` using pip:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` openlit`})]}),`\n`]})})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`2. Set Environment Variables`})}),_jsx(_components.p,{children:`Configure the required environment variables for exporting telemetry data:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OTEL_EXPORTER_OTLP_ENDPOINT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://otel.trusys.ai\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OTEL_EXPORTER_OTLP_HEADERS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key=abc123\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OTEL_SERVICE_NAME`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"xyz123\"`})]}),`\n`]})})}),_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[`💡 Replace `,_jsx(_components.code,{children:`abc123`}),` with your actual API key. Refer to the documentation on “How to Create an API Key” for more details.\n💡 Replace `,_jsx(_components.code,{children:`xyz123`}),` with your actual application ID of your application on trusys platform.`]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`3. Import the SDK`})}),_jsxs(_components.p,{children:[`In your application code, import the `,_jsx(_components.code,{children:`openlit`}),` SDK:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openlit`})]}),`\n`]})})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`4. Initialize the SDK`})}),_jsxs(_components.p,{children:[`Initialize `,_jsx(_components.code,{children:`openlit`}),`:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`openlit.init()`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Typescript`,id:`typescript`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`1. Install the SDK`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` openlit`})]}),`\n`]})})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`2. Set Environment Variables`})}),_jsx(_components.p,{children:`Configure the required environment variables for exporting telemetry data:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OTEL_EXPORTER_OTLP_ENDPOINT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://otel.trusys.ai\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OTEL_EXPORTER_OTLP_HEADERS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key=abc123\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OTEL_SERVICE_NAME`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"xyz123\"`})]}),`\n`]})})}),_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[`💡 Replace `,_jsx(_components.code,{children:`abc123`}),` with your actual API key. Refer to the documentation on “How to Create an API Key” for more details.\n💡 Replace `,_jsx(_components.code,{children:`xyz123`}),` with your actual application ID of your application on trusys platform.`]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`3. Import the SDK`})}),_jsxs(_components.p,{children:[`In your application code, import the `,_jsx(_components.code,{children:`openlit`}),` SDK:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`import`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` openlit`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Openlit\"`})]}),`\n`]})})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`4. Initialize the SDK`})}),_jsxs(_components.p,{children:[`Initialize `,_jsx(_components.code,{children:`Openlit`}),`:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Openlit.init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})})]})]}),_jsx(_components.p,{children:`This sets up observability and monitoring hooks automatically for your application.`})]}),_jsxs(Accordion,{title:`OpenLIT Operator Integration`,id:`openlit-operator-integration`,children:[_jsx(_components.p,{children:`Trusys supports integration with the OpenLIT Operator, enabling seamless AI observability for your Kubernetes-based applications. This integration allows you to automatically instrument your AI workloads and send telemetry data to Trusys for comprehensive evaluation and monitoring.`}),_jsx(_components.p,{children:`The OpenLIT Operator provides automated instrumentation for AI applications running in Kubernetes environments. It enables zero-code observability by automatically injecting OpenTelemetry instrumentation into your pods, capturing traces and metrics from LLM calls, AI frameworks, and vector databases without requiring any code modifications.`}),_jsx(Heading,{level:`2`,id:`getting-started`,children:`Getting Started`}),_jsx(Heading,{level:`3`,id:`prerequisites`,children:`Prerequisites`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Kubernetes cluster with OpenLIT Operator installed`}),`\n`,_jsx(_components.li,{children:`Trusys account with monitoring enabled`}),`\n`,_jsx(_components.li,{children:`OTLP endpoint URL from your Trusys application settings`}),`\n`]}),_jsx(Heading,{level:`3`,id:`configuration-steps`,children:`Configuration Steps`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Install OpenLIT Operator`}),` in your Kubernetes cluster using Helm`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Create AutoInstrumentation resource`}),` targeting your application pods using label selectors`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Configure OTLP endpoint`}),` to point to your Trusys monitoring endpoint`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Restart your pods`}),` to enable automatic instrumentation`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`View traces in Trusys`}),` dashboard under the Traces section`]}),`\n`]}),_jsx(Heading,{level:`3`,id:`example-configuration`,children:`Example Configuration`}),_jsx(_components.p,{children:`Configure your AutoInstrumentation resource to send data to Trusys:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`apiVersion`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`openlit.io/v1alpha1`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`kind`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`AutoInstrumentation`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`spec`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` selector`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` matchLabels`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` app`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`your-ai-application`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` otlp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` endpoint`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://your-trusys-endpoint:4318\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer YOUR_TRUSYS_API_KEY\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Replace `,_jsx(_components.code,{children:`your-trusys-endpoint`}),` and `,_jsx(_components.code,{children:`YOUR_TRUSYS_API_KEY`}),` with your actual Trusys monitoring endpoint and API key.`]})]})]})]}),_jsxs(Step,{title:`Define Collection Settings`,children:[_jsx(_components.p,{children:`Configure how Trusys collects data from your logs:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Sampling Frequency`}),` – Choose between percentage-wise or count-wise sampling.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Enter Percentage or Count`}),` – Specify the exact percentage of logs to sample (e.g., 10% of logs) or the number of logs to sample (e.g., 100 logs).`]}),`\n`]}),_jsxs(_components.blockquote,{children:[`\n`,_jsx(_components.p,{children:`By default, sampling is performed and evaluated every hour.`}),`\n`]})]}),_jsx(Step,{title:`Define Functional Monitoring Metrics`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Select functional metrics`}),` against which you want to monitor your production logs and define their respective expected values. These metrics assess the performance and accuracy of your AI application in real-time.`]})}),_jsx(Step,{title:`Define Security Monitoring Metrics`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Select vulnerable categories`}),` you wish to monitor for your application. This ensures continuous vigilance against potential security threats and compliance breaches.`]})})]}),_jsxs(Tip,{children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Session Tracking for Conversational Applications`})}),_jsxs(_components.p,{children:[`For applications that maintain user sessions (such as chatbots, virtual assistants, or multi-turn conversational interfaces), implement session tracking to enable comprehensive evaluation and monitoring of complete user journeys.\nEvaluation is performed on traces with the same `,_jsx(_components.code,{children:`application.id`}),`, and sessions are identified by grouping traces that share a `,_jsx(_components.code,{children:`session.id`}),` attribute. The end of a session is explicitly marked with the `,_jsx(_components.code,{children:`ended`}),` status.`]}),_jsx(_components.p,{children:`On every request:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` opentelemetry`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` import`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` trace`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`span`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` trace.get_current_span`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`span.set_attribute(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`\"session.id\"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cuser_session_id>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(_components.p,{children:`On session end:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`tracer`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` trace.get_tracer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`__name__`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`with`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` tracer.start_as_current_span`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`\"session.end\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`as`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` span:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` span.set_attribute(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`\"session.id\"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\u003cuser_session_id>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` span.set_attribute(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`\"session.status\"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`,`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ended\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]}),_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[`Upon successfully enabling monitoring, you will begin to see traces from your application appear in the `,_jsx(_components.a,{href:`#traces`,children:_jsx(_components.strong,{children:`Traces`})}),` section, detailed evaluation results for each log, and a `,_jsx(_components.a,{href:`#track-dashboard`,children:_jsx(_components.strong,{children:`Monitoring Dashboard`})}),` providing an overview of your application’s health, functional metric evaluations, and security evaluations.`]}),`\n`]})]}),_jsxs(Tab,{title:`Guardrails`,icon:`4`,id:`guardrails`,children:[_jsxs(_components.p,{children:[`TRUGUARD allows you to define `,_jsx(_components.strong,{children:`input and output guardrails`}),` for your application by combining validators with configurable enforcement actions. This ensures unsafe, non-compliant, or undesired content is handled consistently before it reaches end users or downstream systems.`]}),_jsx(_components.p,{children:`To configure TRUGUARD, users must first select one or more validators and define how the system should respond when a validation fails.`}),_jsxs(Steps,{children:[_jsxs(Step,{title:`Select Validators`,children:[_jsx(_components.p,{children:`TRUGUARD currently supports the following validators:`}),_jsxs(_components.p,{children:[`TruGuard provides a set of validators that can be applied to `,_jsx(_components.strong,{children:`input`}),` and `,_jsx(_components.strong,{children:`output`}),` guardrails. Each validator checks content for a specific type of risk, policy violation, or quality issue.`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/concepts/validators#input-guardrails`,children:`Input Guardrails`}),` – Applied before the model processes the request`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/concepts/validators#output-guardrails`,children:`Output Guardrails`}),`– Applied before the response is returned to the user`]}),`\n`]})]}),_jsxs(Step,{title:`Configure On-Fail Actions`,children:[_jsxs(_components.p,{children:[`For every enabled validator, users must define an `,_jsx(_components.strong,{children:`On-Fail Action`}),`. This determines what Trusys should do when a validation fails.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Available On-Fail Actions`})}),_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`FIX – Clean the content`}),` :\nTrusys replaces the detected PII with the corresponding entity type.\nFor example, John Doe → \u003c PERSON >`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Filter`}),_jsx(_components.br,{}),`\n`,`Trusys replaces the unsafe portion with a safe alternative.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Mask`}),`\nTrusys masks the unsafe portion.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Encrypt`}),_jsx(_components.br,{}),`\n`,`Trusys encrypts the detected PII so it is not exposed in plaintext.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Fail`}),`\nTrusys suppresses the response entirely to protect end users or the AI system.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Ignore but log the issue`}),_jsx(_components.br,{}),`\n`,`The response is returned as-is, but the failure is logged for auditing and analysis.`]}),`\n`]}),`\n`]}),`\n`]})]}),_jsxs(Step,{title:`Run Guardrails in Your Application`,children:[_jsx(_components.p,{children:`Once your guardrail configurations are set in the Trusys portal, running TruGuard in your application takes just three steps.`}),_jsxs(Steps,{children:[_jsxs(Step,{title:`Install the TruGuard SDK`,children:[_jsx(_components.p,{children:`Install TruGuard like any other Python dependency:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` trusys`})]}),`\n`]})})})]}),_jsxs(Step,{title:`Set Credentials`,children:[_jsx(_components.p,{children:`TruGuard needs credentials to fetch guardrail configurations for your application.\nSet the following environment variables:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` TRUSYS_APPLICATION_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`app_xxx`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` TRUSYS_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sk_xxx`})]}),`\n`]})})}),_jsx(_components.p,{children:`These values are available in the Trusys portal under your application details.`})]}),_jsxs(Step,{title:`Initialize TruGuard`,children:[_jsx(_components.p,{children:`This is the startup step that activates TruGuard.`}),_jsxs(_components.p,{children:[`Call `,_jsx(_components.code,{children:`truguard.init()`}),` once when your application boots (for example, in main.py, app startup, or worker initialization).`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` trusys`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` import`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` truguard`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`truguard.init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`]})})}),_jsx(_components.p,{children:`What happens during initialization`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`TruGuard fetches input and output guardrail configurations from Trusys`}),`\n`,_jsx(_components.li,{children:`Configurations are cached in memory`}),`\n`,_jsx(_components.li,{children:`A background refresh loop keeps configs up to date`}),`\n`,_jsx(_components.li,{children:`No redeploy is required when guardrails change`}),`\n`]})]})]}),_jsx(_components.p,{children:`Once initialized, TruGuard is active and ready.`})]})]}),_jsx(Tip,{children:_jsxs(_components.p,{children:[`For more details - `,_jsx(_components.a,{href:`https://pypi.org/project/trusys/`,children:`See Developer Doc`})]})})]})]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`1`,id:`application-list-overview`,children:`Application List Overview`}),`\n`,_jsx(_components.p,{children:`The Application List offers a centralized view of all AI applications and LLM models linked to your project. This list allows you to quickly access key information, including:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Functional Evaluations`}),` – Count of performance tests`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Security Evaluations`}),` – Count of security audits`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Production Monitoring`}),` – Indicates whether the app is currently monitored live`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`1`,id:`application-details`,children:`Application Details`}),`\n`,_jsx(_components.p,{children:`Clicking on a specific application within the Application List will take you to the Application Details page, offering an in-depth view of its configuration, evaluation results, and monitoring settings.`}),`\n`,_jsx(Heading,{level:`3`,id:`view-functional-and-security-evaluation-details`,children:`View Functional and Security Evaluation Details`}),`\n`,_jsx(_components.p,{children:`Access a comprehensive list of the functional and security evaluations performed on your application. This includes insights from TRU EVAL (functional performance, accuracy, etc.) and TRU SCOUT (security vulnerabilities, compliance adherence). Click on each test evaluation list to view the report and details of each test run.`}),`\n`,_jsx(Heading,{level:`3`,id:`connection-details-for-evaluation-and-monitoring`,children:`Connection Details for Evaluation and Monitoring`}),`\n`,_jsx(_components.p,{children:`This section displays all the parameters and credentials used to connect your AI application or LLM model to Trusys for both evaluation and continuous monitoring.`}),`\n`,_jsx(Heading,{level:`3`,id:`view-monitoring-settings`,children:`View Monitoring Settings`}),`\n`,_jsx(_components.p,{children:`This part of the Application Details page outlines the specific configurations for live monitoring of your production application. It includes details such as:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Sampling Rates`}),` Frequency of data collection.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Monitored Metrics`}),` PII Leak, hallucination, and specific AI performance indicators.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Monitored Security Categories`}),` Hate speech, data leakage, adversarial attacks.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`These settings ensure Trusys provides continuous, relevant insights into your application’s real-world performance and security posture.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Application","icon":"grip","iconType":"light","description":null,"href":"/product/applications"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Connect an AI Application","slug":"connect-an-ai-application","depth":1,"children":[]},{"title":"Application List Overview","slug":"application-list-overview","depth":1,"children":[]},{"title":"Application Details","slug":"application-details","depth":1,"children":[{"title":"View Functional and Security Evaluation Details","slug":"view-functional-and-security-evaluation-details","depth":3,"children":[]},{"title":"Connection Details for Evaluation and Monitoring","slug":"connection-details-for-evaluation-and-monitoring","depth":3,"children":[]},{"title":"View Monitoring Settings","slug":"view-monitoring-settings","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"trusys","siteName":"trusys Documentation","title":"Application - trusys Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-18T08:11:18.590Z","originalFileLocation":"product/applications.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"trusys Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/trusys/6_ROcQhrVW0BUX3i/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/trusys/6_ROcQhrVW0BUX3i/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/trusys/6_ROcQhrVW0BUX3i/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/trusys/6_ROcQhrVW0BUX3i/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/trusys/6_ROcQhrVW0BUX3i/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/trusys/6_ROcQhrVW0BUX3i/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/trusys/6_ROcQhrVW0BUX3i/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/trusys/6_ROcQhrVW0BUX3i/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/trusys/6_ROcQhrVW0BUX3i/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Application - trusys Documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"trusys Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.trusys.ai/product/applications\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://trusys.mintlify.app/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=Application\u0026amp;theme=b50dcfe2961a5c777da19639\u0026amp;signature=702e6c78427b783bae1b53ad850350e73c237411b808b9d0e0ca27995f652d8c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Application - trusys Documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://trusys.mintlify.app/_mintlify/api/og/v2?division=Get+Started\u0026amp;title=Application\u0026amp;theme=b50dcfe2961a5c777da19639\u0026amp;signature=702e6c78427b783bae1b53ad850350e73c237411b808b9d0e0ca27995f652d8c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/trusys/6_ROcQhrVW0BUX3i/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"trusys Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0040FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.trusys.ai/product/applications\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/product/applications.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.trusys.ai/#organization\",\"name\":\"trusys Documentation\",\"url\":\"https://docs.trusys.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/trusys/7mrr5sZer7ROLsws/logo/trusysLogo-a.svg?fit=max\u0026auto=format\u0026n=7mrr5sZer7ROLsws\u0026q=85\u0026s=a7ea07979de9ffd26fc81868d5281b13\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.trusys.ai#website\",\"name\":\"trusys Documentation\",\"url\":\"https://docs.trusys.ai\",\"publisher\":{\"@id\":\"https://docs.trusys.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.trusys.ai/product/applications#webpage\",\"url\":\"https://docs.trusys.ai/product/applications\",\"name\":\"Application\",\"dateModified\":\"2026-09-18T08:11:18.590Z\",\"isPartOf\":{\"@id\":\"https://docs.trusys.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.trusys.ai/product/applications#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.trusys.ai/product/applications#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"trusys Documentation\",\"item\":\"https://docs.trusys.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Application\",\"item\":\"https://docs.trusys.ai/product/applications\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.trusys.ai/product/applications#article\",\"headline\":\"Application\",\"name\":\"Application\",\"url\":\"https://docs.trusys.ai/product/applications\",\"mainEntityOfPage\":{\"@id\":\"https://docs.trusys.ai/product/applications#webpage\"},\"dateModified\":\"2026-09-18T08:11:18.590Z\",\"publisher\":{\"@id\":\"https://docs.trusys.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.trusys.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"trusys Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"trusys Documentation","nav":{"global":{"anchors":[{"anchor":"Book a Demo","icon":"headset","href":"https://www.trusys.ai/demo"}]},"tabs":[{"tab":"📖 Product Guide","groups":[{"group":"Components","pages":[{"title":"Security Evaluation","tag":"TRU SCOUT","href":"/intro/truscout"},{"title":"Functional Evaluation","tag":"TRU EVAL","href":"/intro/trueval"},{"title":"Production Monitoring","tag":"TRU PULSE","href":"/intro/trupulse"},{"title":"AI Guardrails","tag":"TRU GUARD","href":"/intro/truguard"},{"title":"Argus","tag":"AI Assistant","description":null,"href":"/intro/argus"}]},{"group":"Get Started","pages":[{"title":"Application","icon":"grip","iconType":"light","href":"/product/applications"},{"title":"Command-Line Usage","icon":"code","iconType":"light","description":null,"href":"/product/command-line-usage"},{"title":"Using CI/CD","icon":"code-commit","iconType":"light","href":"/product/cicd-usage"}]},{"group":"TRU SCOUT","pages":[{"title":"Security Evaluation","icon":"shield","iconType":"light","href":"/product/tru-scout"},{"title":"Security Configs","icon":"clipboard","iconType":"light","href":"/product/security-config"}]},{"group":"TRU EVAL","pages":[{"title":"Functional Evaluation","icon":"flag","iconType":"light","href":"/product/tru-eval"},{"title":"Prompt Library","icon":"burst","iconType":"light","href":"/product/prompt-library"},{"title":"Datasets","icon":"database","iconType":"light","href":"/product/dataset"}]},{"group":"TRU PULSE","pages":[{"title":"Monitor Settings","icon":"lightbulb","iconType":"light","href":"/product/monitor-settings"},{"title":"Track (Dashboard)","icon":"chart-pie","iconType":"light","href":"/product/tru-pulse"},{"title":"Logs","icon":"bars","iconType":"light","href":"/product/traces"}]},{"group":"TRU GUARD","pages":[{"title":"Analytics \u0026 Exception","icon":"tower-broadcast","iconType":"light","href":"/product/validation-exeptions"}]},{"group":"Feature \u0026 Tools","pages":[{"title":"Notifications","icon":"bullhorn","iconType":"light","href":"/tools/alerts"},{"title":"Boards","icon":"table-columns","iconType":"light","href":"/tools/boards"},{"title":"Scheduled Jobs","icon":"clock","iconType":"light","href":"/tools/scheduled-jobs"},{"title":"Optimization Playground","icon":"campground","iconType":"light","href":"/tools/optimisation"},{"title":"RAG Poisioning","icon":"radiation","iconType":"light","href":"/tools/rag-poisoning"},{"title":"Text to Speech","icon":"language","iconType":"light","href":"/tools/text-to-speech"}]},{"group":"Workspace \u0026 Account","pages":[{"title":"Workspace","href":"/workspace/workspace"},{"title":"Account","href":"/workspace/account"},{"title":"Projects","href":"/workspace/projects"},{"title":"API Keys","href":"/workspace/api-keys"},{"title":"User Management","href":"/workspace/user-management"}]}]},{"tab":"📚 Core Concepts","pages":[{"title":"📚 Core Concepts","href":"/concepts/prompts"}]},{"tab":"💻 Trusys MCP","pages":[{"title":"💻 Trusys MCP","href":"/mcp/mcp"}]},{"tab":"\u003c/> APIs","pages":[{"title":"\u003c/> APIs","href":"/api-reference/applications/list-applications"}]},{"tab":"🧪 Experiment with Sample Applications","pages":[{"title":"🧪 Experiment with Sample Applications","href":"/sample-apps/trust-bank-bot"}]}]},"title":"Application - trusys Documentation","buildId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","deploymentId":"dpl_DFJrtvUi8HS5F9nkooKuDJsuD5BM","dynamics":[],"chunks":[]}