Leagle

The Problem

Regulations are constantly changing, but understanding what those changes mean for a specific organization is still largely a manual process.

A compliance team may have to go through hundreds of pages of regulations, internal policies, procedures, and existing controls to answer basic questions:

  • Which policies are affected?
  • What compliance gaps exist?
  • What risks should be prioritized?
  • What needs to change?
  • What action should the organization take?

The problem isn't simply finding a regulation. The real challenge is connecting that regulation to what an organization is already doing.

That's where Leagle comes in.


💡 What Inspired Us

We started with a simple question:

"When a regulation changes, how does a company actually figure out what it needs to change?"

We realized that organizations often have their regulatory requirements and internal policies spread across different documents and systems. A compliance professional has to manually connect the dots between them.

We wanted to build something that could automate that repetitive process.

Our goal was not to build another AI tool that simply summarizes legal documents.

We wanted to answer a much more useful question:

"Don't just tell us what the regulation says. Tell us what it means for us."

That idea became the foundation of Leagle.


🚀 What Is Leagle?

Leagle is an AI-powered compliance intelligence platform that connects external regulations with internal company policies to turn regulatory changes into actionable insights.

Instead of treating regulations and company policies as separate documents, Leagle creates a complete workflow:

Regulation → Policy → Semantic Search → Impact Analysis → Compliance Gap → Risk → Action

Leagle helps organizations identify affected policies, surface compliance gaps, assess potential impact, and generate actionable recommendations.


⚙️ How We Built It

We built Leagle around a Retrieval-Augmented Generation (RAG) architecture.

The system combines document processing, embeddings, vector search, and LLM-based analysis to connect regulatory requirements with internal company knowledge.

The core pipeline looks like this:

Regulation / Internal Policy
            ↓
     Document Ingestion
            ↓
      Text Chunking
            ↓
    Embeddings Generation
            ↓
      Vector Database
            ↓
     Semantic Retrieval
            ↓
      Relevant Context
            ↓
       RAG Analysis
            ↓
   Regulatory Impact Analysis
            ↓
 Compliance Gap + Risk + Action

1. Document Ingestion

Users can upload regulatory documents and internal company policies.

The documents are processed and divided into meaningful sections so that relevant information can be retrieved later.

2. Embeddings & Semantic Search

Instead of relying only on keyword matching, Leagle converts document content into vector embeddings.

This allows users to ask questions in natural language and retrieve information based on meaning and context.

For example:

"What controls does this organization currently have for data protection?"

Leagle can retrieve the relevant sections even when the exact words in the question don't appear in the document.

3. RAG-Based Analysis

The retrieved regulatory and policy context is passed into the AI analysis pipeline.

Rather than asking an LLM to answer using only its general knowledge, Leagle provides the relevant source context first.

This allows the system to analyze the relationship between:

Regulatory Requirement + Existing Company Policy

and produce structured findings.

4. Impact Analysis

Impact analysis is the core feature of Leagle.

The system identifies:

  • Affected policies
  • Relevant regulatory requirements
  • Existing controls
  • Compliance gaps
  • Impact levels
  • Recommended actions

This transforms a collection of documents into an actionable compliance assessment.

5. Risk Intelligence

Once gaps are identified, Leagle turns them into risk signals that can be visualized through the dashboard and risk heatmap.

This helps compliance teams understand where attention is required.

6. Alerts

Important findings can be surfaced through alerts so teams can quickly identify issues that require investigation or remediation.


🧠 What We Learned

One of the biggest lessons from building Leagle was that building a useful AI application requires much more than connecting an LLM to a prompt.

We learned how to work with:

  • Document ingestion
  • Text chunking
  • Embeddings
  • Vector databases
  • Semantic retrieval
  • RAG pipelines
  • Structured LLM outputs
  • Risk analysis
  • AI-powered application workflows

We also learned that retrieval quality is critical to AI quality.

If the system retrieves the wrong regulatory or policy context, even a powerful language model can generate an inaccurate or irrelevant analysis.

This made chunking strategy, embeddings, metadata, retrieval quality, and context construction extremely important parts of the project.

Another important lesson was that AI output needs to be structured and actionable.

A paragraph explaining a regulation isn't enough for a compliance workflow. The system needs to transform that information into something a team can actually work with:

Finding → Risk → Recommendation → Action


🧩 Challenges We Faced

Connecting Unstructured Documents

Regulatory and internal policy documents can be long, complex, and inconsistent.

The same concept can be expressed using completely different terminology across different documents.

Designing the ingestion and retrieval pipeline to find the right context was therefore one of our biggest challenges.

Maintaining Relevant Context

Sending an entire document to an LLM isn't practical or reliable.

We had to design a retrieval process that could identify the most relevant sections while providing enough surrounding context for meaningful analysis.

Structuring AI Output

LLMs naturally generate flexible text, but the rest of our application needs structured information.

We had to design the analysis layer so that the output could be translated into:

Affected Policy → Gap → Impact → Risk → Recommendation

and then displayed through the dashboard.

Connecting AI to a Real Workflow

Another challenge was making sure Leagle wasn't just an AI demo.

The retrieved information had to flow through the complete application:

Documents → Search → Analysis → Risk → Alerts

This required connecting the AI layer with the application backend, database, vector search, and frontend experience.


🎯 What We Built

Leagle brings regulatory analysis and internal policy intelligence into a single workflow.

Instead of manually doing:

Read → Search → Compare → Interpret → Prioritize

Leagle helps teams move through:

Regulation → Impact → Gap → Risk → Action

The goal is not to replace lawyers or compliance professionals.

The goal is to reduce repetitive document-review work and help professionals spend more time making decisions and less time manually connecting information across documents.

Built With

Share this project:

Updates

Submission history