Skip to content
Featured

ClarissaBot

Democratizes access to vehicle safety information through conversational AI

AI-powered vehicle safety assistant that queries NHTSA data in real-time. Check recalls, safety ratings, and consumer complaints through natural conversation.

.NET 10 React TypeScript Azure OpenAI Azure Container Apps Bicep SSE
Screenshot of ClarissaBot

Architecture

flowchart LR
    subgraph Frontend
        A[React App]
        B[SSE Client]
    end
    subgraph Backend
        C[ASP.NET API]
        D[Clarissa Agent]
        E[Tool Registry]
    end
    subgraph Azure
        F[Azure OpenAI]
        G[Container Apps]
    end
    subgraph External
        H[NHTSA API]
    end
    A --> C
    B --> C
    C --> D
    D <--> F
    D --> E
    E --> H
    C --> G

The Problem

Vehicle safety information exists in public NHTSA databases, but accessing it requires navigating complex government interfaces and knowing exactly what to search for. Consumers can't easily ask natural questions like 'should I be worried about my car?' and get meaningful answers that synthesize recalls, complaints, and safety ratings.

The Solution

Built an AI agent using Azure AI Foundry that understands natural language questions about vehicle safety. The agent uses function calling to query live NHTSA APIs, maintains conversational context across turns, and streams responses in real-time. Infrastructure-as-Code with Bicep enables reproducible deployments with managed identity authentication.

The Results

  • Real-time streaming responses via Server-Sent Events
  • Function calling against live NHTSA APIs
  • VIN decoding for automatic vehicle identification
  • Multi-vehicle context tracking in conversations
  • Zero-secret deployment with Azure managed identity
5
NHTSA Tools
502
Training Samples
SSE
Streaming
Managed ID
Auth

ClarissaBot is a conversational AI assistant that helps users understand vehicle safety information. Rather than training a model on static data, it uses Azure OpenAI’s function calling to query live NHTSA (National Highway Traffic Safety Administration) data in real-time.

Key Features

  • Natural Language Queries: Ask about recalls, safety ratings, or complaints in plain English
  • Real-time Data: Queries live NHTSA APIs for current information
  • VIN Decoding: Automatically identifies vehicles from VIN numbers
  • Streaming Responses: Token-by-token delivery via Server-Sent Events
  • Context Awareness: Remembers which vehicles you’re discussing

NHTSA Tools

The agent has access to five specialized tools:

ToolDescription
check_recallsFind recall campaigns affecting a vehicle
get_complaintsView consumer-reported problems
get_safety_ratingNCAP crash test ratings (1-5 stars)
decode_vinExtract year/make/model from VIN
check_investigationsActive NHTSA defect investigations

Technical Architecture

The backend is built with .NET 10 and leverages Azure AI Foundry (Azure OpenAI) for the AI capabilities:

var completion = await _chatClient.CompleteChatStreamingAsync(
    messages, 
    options, 
    cancellationToken
);

await foreach (var update in completion)
{
    foreach (var contentPart in update.ContentUpdate)
    {
        yield return new ContentChunkEvent(contentPart.Text);
    }
}

The React frontend connects via SSE for real-time streaming, showing tool calls and responses as they happen.

Reinforcement Fine-Tuning

The project includes a complete RFT (Reinforcement Fine-Tuning) pipeline with 502 training examples and a Python grader that validates responses against live NHTSA data. This enables training specialized models that stay accurate as vehicle safety data evolves.

Infrastructure

Deployed on Azure Container Apps with infrastructure defined in Bicep:

  • Managed Identity: No API keys—RBAC-based authentication to Azure OpenAI
  • Auto-scaling: Scale to zero when idle, burst for traffic
  • Monitoring: Application Insights for observability
  • Container Registry: ACR for image management

Was this helpful?