ClarissaBot is an AI-powered vehicle safety assistant that provides information from the National Highway Traffic Safety Administration (NHTSA). It helps users check vehicle recalls, safety ratings, and consumer complaints using natural language queries.
- Recall Lookup - Check for safety recalls on any vehicle by year, make, and model
- Safety Ratings - Get NCAP crash test ratings (overall, frontal, side, rollover)
- Complaint Search - View consumer complaints and common issues for vehicles
- Vehicle Comparison - Compare safety data between two vehicles
- Streaming Responses - Real-time streaming chat with Server-Sent Events (SSE)
src/
├── ClarissaBot/
│ ├── ClarissaBot.Api/ # ASP.NET Core minimal API
│ ├── ClarissaBot.Core/ # Core agent logic and NHTSA tools
│ ├── ClarissaBot.Console/ # Interactive console application
│ └── ClarissaBot.Tests/ # Unit tests
└── ClarissaBot.Web/ # React + TypeScript frontend
data/
├── graders/ # RFT grader for model fine-tuning
├── rft_training*.jsonl # Training data (502 samples)
├── rft_validation*.jsonl # Validation data (73 samples)
└── schema.json # Structured output schema
- .NET 10 SDK (or use the included
global.json) - Node.js 22+
- Azure subscription with Azure OpenAI access
- Azure CLI authenticated (
az login)
Create or update src/ClarissaBot/ClarissaBot.Api/appsettings.json:
{
"AzureOpenAI": {
"Endpoint": "https://your-resource.openai.azure.com/",
"DeploymentName": "gpt-4o-mini"
}
}Or set environment variables:
AZURE_OPENAI_ENDPOINT- Your Azure OpenAI endpoint URL
The API uses DefaultAzureCredential for authentication, so ensure you're logged in via Azure CLI.
cd src/ClarissaBot/ClarissaBot.Api
dotnet runThe API runs at http://localhost:5080
cd src/ClarissaBot.Web
npm install
npm run devThe frontend runs at http://localhost:5173
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/chat/stream |
Streaming chat via SSE |
| POST | /api/chat |
Non-streaming chat |
| DELETE | /api/chat/{conversationId} |
Clear a conversation |
| GET | /api/health |
Health check |
{
"message": "Are there any recalls on the 2020 Tesla Model 3?",
"conversationId": "optional-conversation-id"
}The agent uses Azure OpenAI function calling with the following tools:
check_recalls- Get recalls by vehicle year/make/modelget_complaints- Get consumer complaintsget_safety_rating- Get NCAP safety ratingsdecode_vin- Decode VIN to get vehicle detailscheck_investigations- Check active NHTSA safety investigations
cd src/ClarissaBot
dotnet testThe data/ directory contains training data and graders for Reinforcement Fine-Tuning on Azure OpenAI.
MIT
Made with ❤️ by Cameron Rye