← All projects

Individual capstone · SDAIA Academy

Darb Assist

Fares and Refunds Assistant

A bilingual AI-powered transit assistant combining RAG, function calling, and deterministic refund rules to answer policy questions, assess refund eligibility, and manage support requests.

My role
AI Developer — Individual Capstone Project
Period
December 2026
Project type
Individual capstone · SDAIA Academy
Status
Completed notebook-based capstone
PythonRAGLangChainChromaDBGPT-4o miniPydanticGradio
GitHub repository ↗
Darb Assist
Original Gradio interface · simulated data

The problem

Transit policy questions and refund requests require reliable policy references and consistent decisions. I built a notebook-based assistant for a simulated network that separates language understanding from refund rules.

My contribution

I implemented the individual capstone in Colab, integrating multilingual retrieval, structured extraction, validated tool calls around the Academy’s simulated services, Python refund rules, confirmation flow, safety checks, Gradio and evaluation.

Core engineering components

01

Policy retrieval

Multilingual MiniLM embeddings and Chroma cosine retrieval support answers with section citations.

02

Structured extraction

Pydantic captures route, date, complaint category and refund request; missing fields can remain null.

03

Validated tools and refund rules

Tool arguments must match extracted data; Python assesses eligibility and can leave it unresolved.

04

Confirmation and safety

Detected PII is masked, unsafe inputs and unsupported output are checked, and ticket creation needs separate confirmation.

System architecture

Input checks and PII masking precede classification. Policy questions go through retrieval and citation validation; complaints use structured extraction, validated trip lookup and Python rules. The Gradio response may offer a pending ticket, created only after a separate confirmation action.

System architecture diagram

View full-size image ↗

Engineering decisions

  • Filter retrieved sections by question language and retain distinct section IDs, up to three results.
  • Revise the extraction prompt to leave unprovided dates null instead of assuming the reference date.
  • Keep refund eligibility in Python; the LLM does not approve refunds.

Evaluation and measured results

Two development runs on December 1, 2026 used GPT-4o mini, top-k = 3 and the same 40 cases. The two improvements were applied together.

38/40 → 40/40Passed test cases
+5 ppPass rate improvement (percentage points)
15/15Manual interface checks reported by the developer
0.625 sImproved mean case latency
MetricBaselineImproved
Overall pass rate95%100%
Passed cases38/4040/40
Structured extraction4/5 (80%)5/5 (100%)
Policy grounding9/10 (90%)10/10 (100%)
Refund rules15/1515/15
Tool handling4/44/4
Safety and privacy6/66/6
Mean case latency0.664 s0.625 s
Model calls2626
Estimated API cost / 1,000 cases$0.031391$0.034099
View full-size image ↗

The same development cases were reused: 100% is not an independent accuracy estimate or a real-world guarantee. Mean latency includes Python-only cases. API cost is estimated for the mixed evaluation workload, not hosting or 1,000 full conversations. Historical run commit IDs were not recorded.

Original evaluation records ↗

Interface gallery

Original Gradio screenshots from the simulated project, not a live service.

Academic acknowledgment

This project was developed as part of the Developing Generative AI Solutions (AE-203) training program at SDAIA Academy.

The implementation uses the Academy’s simulated transit data and existing trip-status and ticket services.

Technology stack

Language models & retrieval

OpenAI GPT-4o miniLangChainChromaDBHugging FaceMultilingual Sentence TransformersRAG

Rules & tools

PythonPydanticFunction Calling

Interface & development

GradioGoogle ColabGitGitHub

Current status and roadmap

Implemented capabilities

  • Bilingual policy answers with section-level citations
  • Structured complaint extraction and validated trip-status tool calls
  • Deterministic Python refund eligibility rules
  • Explicit confirmation before creating a support ticket
  • PII masking, input and output checks, fallback responses

Completed classroom notebook implementation using synthetic transit data. No real refunds, production deployment or independent evaluation. Positive refund tests use synthetic fixtures; missing evidence can leave eligibility unresolved. Ticket storage is in memory. Future work includes stronger date validation, a calibrated retrieval threshold and unseen test cases. The notebook is not the separate FastAPI deliverable.

GitHub repository ↗