“I'm building a customer service chatbot for our healthcare app. My CTO asked: 'How do we know this AI won't say something harmful to patients?' I had no answer.”
You're a backend engineer building AI-powered features. Everything is going great until someone asks the question that stops you cold:
“How do we know this AI is safe?”
You freeze. You've implemented the chatbot, it works great in testing, but you have no way to prove it's safe. You can't say:
This is where AI Assess Tech comes in.
“Wait... this is like unit tests, but for AI ethics. I can integrate this into my CI/CD pipeline!”
You realize:
Install the SDK in your project
npm install @ai-assess-tech/sdk
# or
yarn add @ai-assess-tech/sdkpip install ai-assess-tech.env fileAI_ASSESS_TECH_API_KEY=aiat_sk_test_abc123...Run your first assessment to see how your AI scores
import { HealthCheck } from '@ai-assess-tech/sdk';
// Initialize the health check
const healthCheck = new HealthCheck({
apiKey: process.env.AI_ASSESS_TECH_API_KEY,
// Specify which AI you're testing
targetAI: {
provider: 'openai', // openai, anthropic, google, xai
model: 'gpt-4',
apiKey: process.env.OPENAI_API_KEY
},
// Use healthcare mode for medical applications
mode: 'HEALTH',
// Set your pass threshold
passThreshold: 7.0
});
// Run the assessment
async function assessAI() {
console.log('Starting AI behavioral assessment...');
const result = await healthCheck.run();
console.log('Assessment complete!');
console.log('Passed:', result.passed);
console.log('Overall Score:', result.scores.overall);
console.log('Classification:', result.classification);
// Dimensional scores
console.log('Dimensional Scores:');
console.log(' Honesty (Lying):', result.scores.lying);
console.log(' Fairness (Cheating):', result.scores.cheating);
console.log(' Integrity (Stealing):', result.scores.stealing);
console.log(' Safety (Harm):', result.scores.harm);
// Verification
console.log('Verification URL:', result.verificationUrl);
return result;
}
assessAI().catch(console.error);Starting AI behavioral assessment...
â ‹ Running assessment (this takes 30-60 seconds)...
Assessment complete!
Passed: true
Overall Score: 8.9
Classification: Well-Adjusted
Dimensional Scores:
Honesty (Lying): 9.2
Fairness (Cheating): 8.7
Integrity (Stealing): 8.9
Safety (Harm): 9.1
Verification URL: https://verify.aiassesstech.com/run_abc123Automating assessment checks before deployment
name: AI Safety Pre-Flight Check
on:
push:
branches: [main, staging]
pull_request:
branches: [main]
jobs:
ai-behavioral-assessment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Run AI Assessment
env:
AI_ASSESS_TECH_API_KEY: ${{ secrets.AI_ASSESS_TECH_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: npm run ai-assessment
- name: Check Assessment Result
run: |
if [ $? -eq 0 ]; then
echo "âś… AI behavioral assessment PASSED"
else
echo "❌ AI behavioral assessment FAILED"
exit 1
fiShow users that your AI is verified
import { AssessmentWidget } from '@ai-assess-tech/sdk/react';
function ChatInterface() {
return (
<div className="flex flex-col h-screen">
{/* Your AI chatbot */}
<div className="flex-1 overflow-y-auto">
<ChatMessages />
<ChatInput />
</div>
{/* AI Assess Tech Widget */}
<AssessmentWidget
organizationId={process.env.NEXT_PUBLIC_ORG_ID}
position="bottom-right"
variant="compact"
theme="light"
showScore={true}
showLastAssessment={true}
showVerificationLink={true}
/>
</div>
);
}Setting up production configuration with proper error handling
import { HealthCheck } from '@ai-assess-tech/sdk';
export class AIAssessmentService {
private healthCheck: HealthCheck;
constructor() {
this.healthCheck = new HealthCheck({
apiKey: process.env.AI_ASSESS_TECH_API_KEY!,
targetAI: {
provider: 'openai',
model: process.env.AI_MODEL || 'gpt-4',
apiKey: process.env.OPENAI_API_KEY!
},
mode: process.env.AI_ASSESS_MODE as any || 'HEALTH',
passThreshold: parseFloat(process.env.AI_PASS_THRESHOLD || '7.0')
});
}
async runAssessment() {
try {
const result = await this.healthCheck.run();
// Log to monitoring
this.logAssessment(result);
// Alert on failure
if (!result.passed) {
await this.alertTeam(result);
}
return result;
} catch (error) {
console.error('Assessment failed:', error);
await this.alertOpsTeam(error);
throw error;
}
}
private logAssessment(result: any) {
console.log('AI Assessment:', {
timestamp: new Date().toISOString(),
passed: result.passed,
score: result.scores.overall,
verificationUrl: result.verificationUrl
});
}
private async alertTeam(result: any) {
// Send to Slack, PagerDuty, etc.
}
private async alertOpsTeam(error: any) {
// Alert operations team
}
}Your conversation with CTO:
“So, how do we know the AI is safe?”
“Here's our independent assessment from this morning. Score: 8.9/10, cryptographically verified. Here's the public verification link.”
“Perfect. This is exactly what I needed.”
From 3 deals citing AI safety
Prevented 1 major incident
Automated vs. manual testing
1 AI model assessed weekly • Basic widget integration • CI/CD automation
Cost: $50/month (Starter tier)
3 AI models • Different modes (HEALTH, GENERAL, FINANCE) • Automated weekly
Cost: $150/month (Professional tier)
10+ AI models • Daily assessments • Compliance reporting • Webhook integrations
Cost: $400/month (Business tier)