Inspiration
We received a letter from debt collectors for one of our family members last year. In this case, the letter was demanding about $2000 within just 48 hours and threatening to come arrest the person and garnish their wages if payment was not received. This was enough of a panic for the entire household as none of us could tell whether the letter was real or not, and due to the fact that nearly every part of the letter was illegal. A collector is not allowed to threaten you with arrest as a collector; nor is there any avenue for a legitimate collector to demand you make payment using gift cards, etc. However, unless you have some familiarity with the Fair Debt Collection Practices Act, you likely would not know these things. This incident stuck with us. With over 1/2 of American adults being able to read to the point of being unable to act on everyday documents, these are the documents that will determine if a person retains their home, money or health insurance. While people do read, they still don't understand many documents, as many are written to make it difficult for people to understand what is being asked. This is why we wanted to create something for our family members that we wished they could have had when they were presented the collection letter.
What it does
Decoded checks any confusing government document against real federal law. Paste it in or take a picture. In less than 10 seconds, you receive:
A ruling on your document, including if it is legal. A plain English summary. All deadlines you cannot miss. All rights you have regarding your document. A draft reply to send back.
Every ruling includes a link to the laws supporting your claim.
The report can be converted into seven languages and read out loud. Three document types are supported:
Debt Collection Letters: Evaluated under the Fair Debt Collection Practices Act and Regulation F. Surprise Medical Bills: Evaluated under the No Surprises Act. Insurance Denials: Evaluated under your appeal rights under the Affordable Care Act.
On our best example, a collector demands payment in 48 hours or you may be arrested. Decoded rules the document has legal issues, flags the false-arrest threat as a violation of 15 U.S.C. 1692e, flags the gift card request as fraudulent, tells you that you may request written verification, and drafts that request for you.
What makes it different
A typical chatbot summarizes a scary letter and tells you to pay based on memory, without citing the law. Decoded does not operate like that.
Before running the model, we scan the letter against a database of plain rules, determine its classification, and collect matching law from our corpus. The model can only cite from the corpus, so fictional citations are impossible; if a finding cannot be grounded in the corpus, it will not appear in the output. When Decoded flags your letter as violating the law, it displays the law.
The frontend is built using React, TypeScript, and Vite. The backend runs via a single edge function that houses the AI key server-side and performs multiple processes in one call: scanning for rules, classifying the document, selecting a matching statute, and prompting a vision-capable model to read the image, extract text, and return the law in plain language — no OCR step needed. The fetch phase enforces a "no citation, no claim" policy and produces valid JSON. Read-aloud uses the Web Speech API. Deadlines become calendar reminders with a single tap. All history is saved on the user's device — no accounts, and no documents stored on a server.
Challenges we ran into
- How to stop a language model from creating legal language that doesn't exist, with our first version sounding very authoritative and having made created statutes which don’t exist. We got rid of its memories and required it to create only from our legal corpus and reconciling and discarding what it couldn’t be grounded to.
- Keep the language model truthful. We went against the grain, as we were tempted to let it provide legal advice. We established a clear line: Decoded provides explanation and validation and never provides advice and will direct to accessible resources such as the CFPB and Legal Aid.
- Enforcing strict JSON format under duress. Language models are non-linear and deviate from the initial example created for them. We developed the language model function defensively to include a retry at a stricter instruction and implemented a validated demonstration as a contingency so if the language model works slowly does it affect the customer's use case when they are trying to use it in a live event.
- The process of developing, testing and implementing for users working outside of print effortlessly in seven languages without looking as though we added functionalities would occur. ## Accomplishments that we're proud of Real documents are processed in seconds and generate real citations and links to those citations that you can access. We took a terrifying letter and changed it into a judgment, a set of rights, and a plan, without the model ever creating an actual law. ## What we learned The challenge of an AI system comprehensively providing value lies in the surrounding elements that maintain integrity (fairness/accuracy). We discovered an additional amount of consumer protection regulation than we had anticipated, and learned how to create an "earned trust" rather than "asking for trust ## What's next for Decoded There are several verticals with citations: eviction and housing, public benefits, debt lawsuits, and wage garnishment. There are also many methods to submit documents: camera capture, PDF, or transferring them to a phone using a QR code. You will see the deadline math calculated from the date on your letter. There is a one-tap "find legal aid in your area" button. ## A note on responsibility Decoded explains and checks documents. It is not legal or medical advice, and it always points to real human help. It never fabricates facts, dates, amounts, or rights, and every citation on screen is one you can open and verify.
Built With
- ai-gateway
- css-devpost-wants-these-as-tags
- html
- icalendar-(.ics)
- insforge-(edge-functions
- localstorage
- openrouter
- react
- static-hosting)
- typescript
- vision-capable-llm
- vite
- web-speech-api
Log in or sign up for Devpost to join the conversation.