Skip to content

AI System

The AI system helps triage maintenance requests. It classifies issues, assigns priority, and supports image-based intake.

What It Does

  • Classifies maintenance issues from text.
  • Predicts priority for faster routing.
  • Supports images and videos when media is attached.

How AI Is Used In The System

User message or media
  -> text model and/or vision model
  -> fusion engine
  -> final category and priority
  -> ticket creation or chat reply
  -> AI log saved for review

Models

Text Model

  • Runs in chatbot.py.
  • Uses OpenAI when available.
  • Falls back to local DistilBERT models when needed.
  • Returns category, priority, and confidence.

Vision Model

  • Runs in vision_ai.py.
  • Analyzes uploaded images and videos.
  • Uses a YOLO model plus metadata mapping for labels.

Fusion

  • Runs in fusion_engine.py.
  • Combines text and vision output into one result.
  • Uses the stronger priority when the two models disagree.

AI classification and fusion pipeline Caption: AI pipeline view showing classification flow, confidence handling, and model outputs.

AI and dispatch workflow diagram Caption: Request intake moving through AI, ticket creation, and dispatch output.

Logging And Feedback

  • AI output is stored in ai_logs and on the ticket record.
  • Logged fields include category, confidence, auto-assignment, and model version.
  • Feedback can be sent to /ai/logs/{id}/feedback to record the actual category later.
  • POST /chat
  • POST /upload-image
  • PATCH /ai/logs/{id}/feedback
  • GET /ai/status