Inspiration
Small service businesses lose valuable leads every day, not because customers always say no, but because callbacks are delayed, appointments are missed, price discussions stall, and follow-ups quietly fall through the cracks.
Most CRM systems store lead data, but they do not clearly explain which lead needs attention first, why that lead matters, what action should happen next, or when outreach should be avoided.
LeadRescue AI was built to solve that gap.
What it does
LeadRescue AI is an explainable lead-recovery copilot that:
- Imports lead data from CSV files
- Normalizes common CRM column variations
- Ranks leads using transparent recovery-priority rules
- Identifies missed callbacks, stalled price conversations, missed appointments, delayed responses, and other follow-up gaps
- Shows the evidence behind every score
- Creates a deterministic recovery message before any AI call is made
- Uses GPT-5.6 only when an authorized user explicitly requests an enhancement
- Provides an improved recovery message, explanation, and conversation guidance
- Prevents unnecessary outreach for recently contacted leads
- Requires human review before any message is sent
The recovery score is a prioritization heuristic, not a prediction of conversion probability.
How we built it
LeadRescue AI was built as a Next.js and TypeScript application.
The product uses two layers:
1. Deterministic recovery engine
The first layer analyzes every record locally using transparent rules based on:
- Buying intent
- Last-contact timing
- Appointment status
- Follow-up attempts
- Callback commitments
- Price and budget signals
- Missing information
- Response fatigue
- Evidence confidence
This layer remains fully usable without generative AI.
2. Controlled GPT-5.6 enhancement
For selected recoverable leads, the user can explicitly request one GPT-5.6 enhancement.
GPT-5.6 produces structured output containing:
- Why the lead needs attention
- An enhanced recovery message
- Conversation guidance
The OpenAI API is called only from a server-side route. The API key is never exposed to the browser.
Additional protections include:
- Private demo access code
- Human-review requirement
- No automatic outreach
- No-outreach rejection for recently contacted leads
- Browser caching of unchanged AI results
- Confirmation before regeneration
- Zero automatic retries
- 15-second timeout
- Vercel firewall rate limiting
- Maximum 3 enhancement requests per minute per IP address
Challenges we ran into
One challenge was balancing useful AI assistance with safety and cost control.
We did not want the application to send messages automatically or call the OpenAI API every time a user opened a lead. To solve this, we separated deterministic analysis from optional GPT enhancement.
Another challenge was making the scoring explainable. Instead of presenting a black-box score, LeadRescue shows the exact evidence that influenced each ranking.
We also added a dedicated no-outreach workflow so that leads contacted recently are not repeatedly messaged.
Deployment security was another important challenge. We ensured that environment variables remain server-side, excluded local secret files from GitHub, added a private access code, and protected the paid endpoint with Vercel rate limiting.
Accomplishments that we are proud of
- Built a fully explainable recovery-priority system
- Preserved useful functionality even without generative AI
- Added a controlled GPT-5.6 enhancement workflow
- Implemented human-review safeguards
- Added no-outreach protection
- Prevented unnecessary repeat API calls through caching
- Added server-side access-code verification
- Added rate limiting for API cost protection
- Deployed the application publicly on Vercel
- Published the complete source code on GitHub
- Used only fictional lead data in the demo
What we learned
We learned that AI is most useful when it supports a clear operational decision rather than replacing human judgment.
We also learned that explainability, cost control, and safe fallback behavior are essential when adding generative AI to a business workflow.
A deterministic system and a generative model do not need to compete. The deterministic layer can provide consistency and auditability, while GPT-5.6 can improve language, context, and conversation support.
What is next for LeadRescue AI
Future versions could include:
- CRM integrations with Zoho, HubSpot, and Salesforce
- Secure user authentication
- Team accounts and role-based permissions
- Server-side persistent caching
- Approved message templates by industry
- WhatsApp and email draft integrations
- Lead-owner assignments
- Recovery performance analytics
- Outcome tracking after follow-up
- Multilingual message support
- Organization-level API budgets and usage controls
The long-term vision is to help small service businesses recover more opportunities without creating more spam, unsafe automation, or unnecessary operational complexity.
Built With
- api
- csv
- eslint
- firewall
- github
- gpt-5.6
- localstorage
- next.js
- openai
- outputs
- react
- responses
- sessionstorage
- structured
- typescript
- vercel
- vitest
- zod
Log in or sign up for Devpost to join the conversation.