Practical TypeScript integration patterns for evaluating AI interaction risks at the application layer.
Developers can use AlephOneNull as an experimental application-layer evaluation aid. It should complement provider guardrails, moderation systems, human review, and domain-specific safety processes.
The package is not yet published to a public registry — build it from source for now (see Installation). Once published, the command below will work:
pnpm add @alephonenull/evalimport { UniversalDetector } from '@alephonenull/eval'
const detector = new UniversalDetector()
export function evaluateResponse(userInput: string, aiOutput: string) {
return detector.detectPatterns(userInput, aiOutput)
}import { EnhancedAlephOneNull } from '@alephonenull/eval'
const safety = new EnhancedAlephOneNull()
export function applySafetyReview(userInput: string, aiOutput: string) {
const result = safety.check(userInput, aiOutput)
if (!result.safe) {
return {
blocked: true,
message: result.message,
violations: result.violations,
}
}
return {
blocked: false,
message: aiOutput,
violations: [],
}
}import { OpenAIWrapper } from '@alephonenull/eval'
const wrapper = new OpenAIWrapper({
apiKey: process.env.OPENAI_API_KEY,
})
const response = await wrapper.createChatCompletion({
model: 'gpt-4o-mini',
messages: [{ role: 'user', content: 'Give grounding advice.' }],
})AlephOneNull is not a certified production safety layer. Production use requires independent testing, security review, legal review, privacy review, and domain-specific safety review.