Inspiration
Managing loan agreements is a compliance nightmare. Every day, loan administrators manually sift through hundreds of pages of legal documents, tracking dozens of deadlines and financial covenants across multiple deals. One missed deadline or overlooked covenant breach can cost millions in penalties.
We asked ourselves: "Why, in the age of AI, are we still Ctrl+F'ing through PDFs?"
The LMA Edge hackathon gave us the perfect opportunity to build what loan administrators actually need—a platform that transforms static legal documents into dynamic, queryable data.
What it does
Sequence is an AI-powered loan management platform that:
Parses Documents Instantly - Upload a PDF or Markdown file, and our Cartographer engine extracts every article, section, and clause while preserving the document hierarchy.
Extracts Obligations Automatically - Using GPT-5 mini, we identify every obligation, reporting requirement, financial covenant, and deadline buried in the legalese.
Enables Natural Language Queries - Ask "What covenants are breached?" and get instant answers with citations to the exact clause.
Monitors Compliance in Real-Time - Track covenant status (compliant, at-risk, breached) across your entire portfolio with a visual dashboard.
Visualizes Deadlines - See every upcoming deadline on a calendar view with color-coded status indicators.
How we built it
Frontend: Next.js 15 with App Router, React, and Tailwind CSS for a modern, responsive interface.
Backend: Convex for serverless functions, real-time subscriptions, and a fully-typed database.
AI/ML Pipeline:
- Reducto API for PDF parsing and structure extraction
- OpenAI GPT-5 mini for obligation extraction and natural language understanding
- Vector embeddings (text-embedding-3-small) for semantic search
- Custom RAG pipeline ensuring all AI responses are grounded in document text
Key Architecture Decisions:
- Chunked processing to handle documents of any size without timeouts
- Incremental extraction with live progress updates
- Citation-backed AI responses to prevent hallucinations
Challenges we ran into
Document Scale - Loan agreements can be 200+ pages with 700+ clauses. We had to implement chunked processing and chain scheduling to stay within serverless time limits.
AI Accuracy - Early versions would hallucinate covenant values. We solved this with a strict RAG pipeline that forces every answer to cite specific document sections.
Real-time UX - Users need to see extraction progress live. Convex's reactive queries made this possible, but required careful state management.
Date Resolution - Loan documents use complex relative dates ("within 45 days after fiscal quarter end"). We built a temporal resolution engine to calculate actual due dates.
Accomplishments we're proud of
- End-to-end pipeline - From PDF upload to queryable data in seconds
- Zero hallucination AI - Every answer cites the source clause
- Beautiful UX - Clean, modern interface that loan admins will actually want to use
- Real-time everything - Live processing status, instant search, reactive dashboards
What we learned
- LLM prompting for structured extraction is an art—specificity matters
- Vector search quality depends heavily on chunk strategy
- Real-time database sync changes everything for UX
- Legal documents have surprisingly consistent patterns once you understand them
What's next for Sequence
- Integration APIs - Connect to Bloomberg Terminal, Loan IQ, and other enterprise systems
- Automated Alerts - Email/Slack notifications for upcoming deadlines and covenant breaches
- Waiver Drafting - AI-generated waiver request letters for covenant breaches
- Multi-document Analysis - Compare covenants across deals and identify portfolio-wide risks
- Mobile App - Compliance monitoring on the go
Built With
- Next.js- TypeScript
- Tailwind CSS
- Convex
- OpenAI
- Reducto
- Vercel
Try It Out Links
- Live: https://usesequence.co
- GitHub Repository: https://github.com/emmanuel39hanks/sequence-submission
- Demo Video: https://youtu.be/T9WAfSb1apU
Built With
- convex
- next.js
Log in or sign up for Devpost to join the conversation.