Inspiration
Small online apparel stores have refund records and customer feedback, but connecting them takes manual work. Customers describe similar problems differently: “too tight at the waist” and “barely fits” may both indicate a sizing issue.
We wanted to answer a useful business question: Which recurring product problem should a store owner investigate first, and what evidence supports that decision?
That question inspired ShopDetective.
What it does
ShopDetective connects customer complaints with purchase and refund records to produce evidence-backed investigation priorities.
Owners upload two CSV files: purchase lines with recorded refunds, and customer messages. The app then:
- Classifies feedback into issues such as sizing, delivery and wrong items.
- Ranks product issues by their associated recorded refunds.
- Shows the original messages and exact supporting quotes.
- Sends ambiguous or conflicting cases to owner review.
- Records corrections in an audit history and updates the report.
- Suggests investigations and exports findings, evidence and reports.
Refunds without an accepted issue remain visible as unassigned amounts.
How we built it
We built a single Streamlit application in Python, using pandas to process CSV data and Plotly to display findings.
Gemini interprets customer feedback and returns structured complaint labels with supporting quotes. Pydantic validates the response structure, while additional Python checks verify message IDs, allowed labels and exact quote matches.
Python calculates all financial totals in integer minor currency units. Each purchase line contributes its refund once, even when several messages describe the same purchase.
Owner corrections create an audit record, increment the report version and invalidate outdated action suggestions. Reports can be downloaded as CSV, JSON and Markdown.
We used Claude to assist with implementation, then refined the build through code review and regression testing.
Challenges we faced
One challenge was handling several messages about the same purchase without counting its refund repeatedly.
Another was resolving feedback that mentions multiple problems or contradicts another message. We added an explicit review workflow so the owner can choose the primary issue and explain the decision.
We also needed to make the demonstration transparent. Sample mode uses clearly labelled synthetic reference data, while Live AI mode calls Gemini.
Accomplishments
The revised build passes 132 offline tests, including input validation, refund reconciliation and correction workflows.
Our synthetic example contains 300 purchase lines and 79 customer messages. It identifies hoodie sizing issues associated with INR 9,600 of INR 16,000 in recorded hoodie refunds, with supporting evidence available for inspection.
These are synthetic demonstration results. Refund associations do not establish causes or guarantee savings.
What we learned
We learned that useful business AI needs traceable evidence and reliable calculations. An exact quote check confirms that the text exists, but it does not prove that the model interpreted it correctly.
Human review, visible uncertainty and audited corrections therefore became central parts of our design.
What’s next
We plan to human-verify the evaluation labels and pilot the workflow with anonymized store exports. The current build holds analysis in session memory and provides exports for preserving reports.
Team
Kshitij Vashisht and Raghupati Tejas Sairam
Log in or sign up for Devpost to join the conversation.