STRIDE Assistant — Intelligent, Policy-Aware Complaint Resolution System

Published: (December 24, 2025 at 07:00 AM EST)
4 min read
Source: Dev.to

Source: Dev.to

Managing customer complaints in footwear retail is complex. Orders, warranties, product defects, and outlet‑specific policies intersect, creating a challenging decision space. STRIDE Assistant is an AI‑driven system that automates complaint handling while ensuring policy compliance, accountability, and human oversight.

This post walks you through why STRIDE Assistant exists, how it works, and how it combines AI with deterministic policy logic to deliver reliable, auditable decisions.

The Problem

A customer messages support:

“My shoe tore 4 days after purchase.”

Without automation, staff must manually check order date, warranty, policies, and inventory. Multiply that by hundreds of tickets daily — it’s slow and error‑prone.

The Solution

STRIDE Assistant solves this by combining:

  1. AI‑driven semantic analysis – interprets customer complaints.
  2. Deterministic policy enforcement – validates actions based on rules, orders, and inventory.
  3. Human‑in‑the‑loop escalation – handles ambiguous cases.
  4. Immutable audit logging – provides compliance and traceability.

Result: fast, accurate, and accountable customer service.

End‑to‑End Flow

Customer Message
        |
Session Verification (Order + Phone + JWT)
        |
Semantic Analysis (Intent Detection)
        |
Clarification Step (if needed)
        |
Policy Retrieval
        |
Decision Engine (Policy + Order Data + Inventory)
        |
+----------------------+
| FINAL DECISION / TICKET |
+----------------------+
        |
   OR Manual Review -> Ticket Created

Components

ComponentTool / ModelPurpose
Semantic Analysis & RAG RetrieverMistral-7B-InstructMain LLM for intent detection and generating human‑readable responses. Chosen for high instruction‑following capability and reasonable compute requirements.
EmbeddingsSentenceTransformer("all-MiniLM-L6-v2")Converts policy chunks and messages into vectors for semantic search. Enables efficient and accurate retrieval of relevant policy segments.
API LayerFastAPIProvides endpoints for customers, staff, and admin with JWT authentication.
DatabasePostgreSQLStores orders, tickets, staff actions, and audit logs. Supports transactions and versioning.
LoggingPython logging with structured configurationCaptures all AI decisions, system errors, and staff actions.

Why These Models?

  • Mistral‑7B‑Instruct – strong instruction‑following for safe, professional responses.
  • all‑MiniLM‑L6‑v2 – lightweight embedding model that retrieves relevant policy content efficiently, ensuring decisions respect company rules.

Decision Logic

STRIDE Assistant combines two complementary logic layers:

  1. Policy Retriever – interprets the complaint, maps it to relevant policy rules, and generates an initial suggested action.

  2. Decision Engine – validates the suggested action using order history, warranty periods, inventory, and past interactions. It produces an authoritative recommendation that can:

    • Approve a replacement/repair.
    • Suggest a free repair.
    • Reject a complaint if:
      • Damage is intentional or the product is too old.
      • The customer repeatedly requests refunds/replacements outside policy limits.
      • Policy rules are not met with the order.

RAG Pipeline

  1. Collect outputs from both logic layers.
  2. Request clarification from the customer if signals are ambiguous.
  3. Aggregate signals across multiple turns to generate the final ticket.
  4. Escalate to manual inspection when needed.

Example Code

# Combine outputs from policy retriever and decision engine
policy_signal   = retriever.get_policy_signal(user_text, order)
decision_signal = engine.make_decision(user_text, order, inventory_available)

# Aggregate signals
signals = [policy_signal, decision_signal]
final_ticket = resolve_final_ticket(signals)

This aggregation ensures that policy compliance, historical data, and customer behavior are all considered before creating a ticket.

Authentication (JWT‑Based)

User TypeCredentialsJWT Purpose
Customerorder_id + phoneSubmit complaints, check status
Staffuser_id + passwordHandle tickets, log actions
Adminuser_id + password + roleReview logs, manage tickets
  • Stateless and scalable across services.
  • Role‑based enforcement for security and accountability.
  • Every action is logged and traceable.

Staff Endpoint

  • Handles ticket actions (approve, reject, escalate) securely.
  • Allows staff to close a ticket or add a note for delay/issue.
log_staff_action(staff.id, ticket_id, action, remarks)

All actions are stored in staff_action_log; admins have read‑only access.

End‑to‑End Example

  1. Customer: “My shoe tore after 4 days of purchase.”

  2. Policy Retriever suggests REPLACEMENT.

  3. Decision Engine validates the suggestion.

  4. RAG asks for clarification if needed.

    Customer replies: “The sole peeled off completely.”

  5. Signals are aggregated.

  6. resolve_final_ticket() determines the final ticket type:

    • RETURN
    • PAID REPAIR
    • REPLACEMENT
    • REPAIR
    • INSPECTION
    • REJECT (if the complaint violates policy)
  7. Inventory check ensures replacements are feasible; otherwise, the case escalates to inspection.

  8. A note is automatically added to every generated ticket so staff understand why the system created it without reviewing the chat data.

  9. Any manual interventions are logged for auditability.

Operational Guarantees

  • Thread‑safe model access for concurrent requests.
  • Database transactions for ticket creation and logging.
  • JWT authentication for all users.
  • Role‑based access control (staff vs. admin).
  • Structured logs & metrics for monitoring.
  • Multi‑model ensembles for higher signal accuracy.
  • Dashboard for analytics and staff performance.
  • Automated policy ingestion with versioning.
  • Predictive ticket prioritization.
  • GPU‑backed inference endpoints for scalability.

Bottom Line

STRIDE Assistant demonstrates how AI can assist human decision‑making in footwear retail complaint handling without replacing the human element. It delivers speed, consistency, and auditability while preserving the necessary oversight for complex, policy‑driven decisions.

STRIDE Assistant Overview

STRIDE Assistant provides policy‑compliant, auditable, and explainable complaint resolution. By combining semantic analysis, deterministic logic, and structured human oversight, STRIDE Assistant can approve, repair, reject, or escalate complaints safely, making it a reliable tool for footwear customer support.

Author: Shushant Rishav
Repository & contact: GitHub

Back to Blog

Related posts

Read more »