Skip to content

The "Legal AI for Bankruptcy Cases" project is an advanced AI-driven system designed to assist legal professionals in navigating the complexities of bankruptcy law. This system employs a Retrieval-Augmented Generation (RAG) architecture to deliver precise and contextually relevant information from legal documents.

License

Notifications You must be signed in to change notification settings

snehvora/Legal-AI-For-Bankruptcy-Cases

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Legal AI for Bankruptcy Cases 🏛️🤖

Installation

  1. Clone the Repository

    git clone <repository-url>
    cd <repository-directory>

Prerequisites

This project uses Poetry for dependency management. Follow the steps below to set up the project.

Ensure you have Poetry installed. If not, you can install it using the following command:

pip3 install poetry

Then, install the dependencies:

poetry install

Then, Run the environment:

poetry shell

Run the Streamlit App

streamlit run ui/app.py

Overview 📜

The "Legal AI for Bankruptcy Cases" project is an advanced AI-driven system designed to assist legal professionals in navigating the complexities of bankruptcy law. This system employs a Retrieval-Augmented Generation (RAG) architecture to deliver precise and contextually relevant information from legal documents.

Components 🛠️

Dependencies

The project leverages several libraries and APIs:

  • Pinecone 🌲: Used for high-performance vector search and similarity queries.
  • Cohere ✍️: Provides text generation and ranking functionalities.
  • Ollama 📝: Offers additional text generation capabilities.
  • Gemini ✨: Includes advanced text generation models.
  • LangGraph 🧩: Manages state graphs and message handling for complex workflows.
  • xml.etree.ElementTree 🗂️: Handles XML parsing and manipulation.

Key Imports

  • Annotated from typing: Provides type annotations for more explicit type hints.
  • TypedDict from typing_extensions: Used for creating dictionary-like objects with a fixed set of keys.
  • pinecone_query from pinecone_utils: Handles querying Pinecone for vector search results.
  • cohere_text_generation and cohere_rerank from cohere_utils: Utilized for generating and ranking text using Cohere's models.
  • ollama_text_generation from ollama_utils: Facilitates text generation using Ollama's models.
  • gemini_text_generation from gemini_utils: Provides text generation capabilities with Gemini's models.
  • StateGraph, START, and END from langgraph.graph: Manages state transitions and workflows within the legal AI system.
  • add_messages from langgraph.graph.message: Handles message addition and management in the state graph.
  • ET from xml.etree.ElementTree: Parses and manipulates XML data.

Functionality ⚙️

AI Components

Text Generation:

  • Cohere ✍️: Utilizes Cohere's models for generating relevant text based on input data and context.
  • Ollama 📝: Provides additional text generation options for varied scenarios.
  • Gemini ✨: Offers advanced text generation capabilities for complex legal contexts.

Text Ranking:

  • Cohere 🔍: Ranks generated text to ensure the most relevant content is highlighted.

Vector Search:

  • Pinecone 🌲: Allows efficient querying and retrieval of similar vectors based on legal data.

State Management

LangGraph 🧩: Manages the state transitions and workflows within the legal AI system. It handles various states of the legal process and manages transitions based on user interactions and system responses.

XML Handling

xml.etree.ElementTree 🗂️: Used for parsing and manipulating XML data, which might be necessary for handling legal documents or case files in XML format.

Usage 🛠️

To utilize the components effectively, ensure that all required libraries and dependencies are installed and properly configured. The system is designed to integrate various AI models and handle complex legal workflows, making it a powerful tool for legal professionals dealing with bankruptcy cases.

License 📜

The project is licensed under the MIT License. See the LICENSE file for more details.

Contact 📧

For any inquiries or support, please contact [email protected].

© 2024 Legal AI for Bankruptcy Cases. All rights reserved.

About

The "Legal AI for Bankruptcy Cases" project is an advanced AI-driven system designed to assist legal professionals in navigating the complexities of bankruptcy law. This system employs a Retrieval-Augmented Generation (RAG) architecture to deliver precise and contextually relevant information from legal documents.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published