ai-legal-compliance-assistant  by Ramseygithub

AI platform for legal compliance analysis

Created 2 months ago
306 stars

Top 87.7% on SourcePulse

GitHubView on GitHub
Project Summary

AI Regulatory Compliance Assistance System

This project offers an AI-powered legal compliance assistant designed for alcohol beverage pricing laws, specifically targeting New York State regulations. It automates the extraction, analysis, and explanation of complex legal frameworks by integrating Retrieval-Augmented Generation (RAG) with knowledge-graph reasoning, aiming to simplify regulatory interpretation for businesses and legal professionals.

How It Works

The system ingests PDF or HTML regulatory documents, performing text extraction and metadata storage. It utilizes Alibaba Cloud Bailian's Embedding API for text vectorization and builds indexes for semantic similarity search. A knowledge graph is constructed by extracting legal entities (articles, violations, penalties) and their inter-relationships, outputting a JSON representation. The RAG service retrieves regulations based on vector similarity, enhances context with the knowledge graph, and generates professional answers using the Qwen-Turbo model. A compliance determination workflow analyzes business scenarios against regulations, evaluating risk and identifying potential violations.

Quick Start & Requirements

  • Installation: pip install -r requirements.txt
  • Prerequisites: Python 3.8+, Alibaba Cloud Bailian API key (configured via .env file), stable internet connection for cloud services.
  • Running: Execute python run_system.py (select "4. Full Test") or start the service with uvicorn main:app --host 0.0.0.0 --port 8000.
  • Documentation: API documentation available at http://localhost:8000/docs after startup.

Highlighted Details

  • Automated processing of PDF/HTML regulatory documents.
  • AI-powered question answering with explainable rule mapping.
  • Knowledge graph construction for legal entities and relationships.
  • Compliance determination workflow with risk assessment and violation identification.

Maintenance & Community

No specific details regarding maintainers, community channels (e.g., Discord, Slack), or active sponsorships are provided in the README.

Licensing & Compatibility

The README does not specify a software license. This absence requires clarification for adoption decisions, especially concerning commercial use or integration with proprietary systems.

Limitations & Caveats

Current document support is limited to PDF and HTML formats. The system relies on external Alibaba Cloud services, necessitating a stable internet connection and valid API keys with sufficient quotas. Future enhancements indicate a lack of built-in support for additional document types (Word, TXT), user permission management, database persistence, and distributed deployment.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.