How we built the Nayya Claims Advocate: Part I

Asher Sered
June 25, 2025

Overview

Imagine you are a migraine sufferer who has struggled with chronic migraines for years. You have tried various treatments with limited success. Due to the lack of response to standard treatments, your doctor suggests a head CT to rule out any severe neurological conditions or even a brain tumor as the potential cause of your headaches. Fortunately, the CT comes out clean. Months later, you receive a letter from your insurer stating they are refusing to pay for your CT because they have deemed your use of a CT scan to have a “lack of medical necessity” in the context of your condition. You are told to expect a bill for several thousand dollars, payable within 90 days.

Every year in the United States, 850 million medical claims are denied — an average of more than two claims per person. Medical claims are often denied for a wide array of reasons, ranging from alleged lack of medical necessity to administrative or paperwork errors in the claim filing. Notably, fewer than 1% of people who receive a denied claim bother to appeal the denial. 

Nayya Claims Advocate is an Agentic AI application that helps consumers appeal denied medical claims. When someone receives a denial letter, they simply need to upload the letter through the application’s UI. Based on the specific circumstances of the denial, the AI Agent takes a series of steps to produce a compelling and optimized denial letter, thereby maximizing the chances of a successful appeal. 

Rapid Prototyping 

These days, people associate building rapid prototypes with vibe coding. While AI-assisted coding tools like Cursor are part of the day-to-day of most engineers at Nayya, these tools are only part of the picture. Large language models (LLMs) themselves dramatically reduce the need to handcraft solutions to problems that previously required custom logic, pipelines, or infrastructure. Whether it’s summarizing text, extracting structured data, or retrieving answers from a large corpus of information, LLMs serve as flexible, out-of-the-box engines that enable developers to focus on integrating capabilities rather than reinventing them. In that way, rapid prototyping isn’t just about moving fast—it’s about skipping entire categories of complexity.

Shortly after identifying the Agentic AI use case, we spent a single sprint building a proof-of-concept prototype that demonstrated the feasibility of agentic AI in constructing claim appeals. While still managing other responsibilities, we developed a working prototype in under two weeks of developer time. The prototype was able to take a PDF denial letter, extract the relevant data, query a knowledge base of valid supporting evidence, and produce a personally tailored appeal letter. Using tools like Langchain for orchestration allowed us to chain LLM calls in a structured manner. AWS Bedrock KnowledgeBases enabled easy deployment of RAG processes, and Chainlit provided a quick and user-friendly interface for demos.

The rapidly developed prototype was highly useful for gathering early feedback from stakeholders, giving the go-to-market team a tangible product to explore and understand, and validating key assumptions with subject matter experts before investing in a full-scale build. It allowed us to shift conversations from abstract ideas to concrete interactions, making it easier to identify gaps, spot opportunities, and build alignment across teams. Having something functional—even if rough—helped clarify priorities and focus discussions on what mattered to users. It also accelerated decision-making by exposing practical constraints and surfacing edge cases we hadn’t considered in early planning. 

Turning Prototype into a Product

Following the success of the prototype, we shifted our focus to building a full-fledged product. That means we had to consider matters such as application stability, security, authentication, infrastructure costs, and UI/UX. We decided to spin up a small, dedicated full-stack engineering team.  This cross-functional group allowed us to move quickly while covering all the critical disciplines needed to support a production-grade AI application. We invested early in robust data pipelines, model monitoring, and scalable infrastructure to ensure the product could handle real-world usage. At the same time, the design and frontend work focused on creating a polished, intuitive user experience that wouldn’t just demonstrate technical capability but deliver real value to end users.

Our work was guided by a series of milestone-based deadlines, which kept the project on track and ensured that we incorporated continuous feedback from a range of stakeholders. We promised to deliver an internal-only release within 4 weeks, an alpha release within 8 weeks, and a beta release within 12 weeks. Each release allowed us to validate key methodologies around modeling, infrastructure, and user experience. 

In Part 2, we will cover how we leveraged Agentic AI and the challenges we overcame