-
Clone the Repository
git clone <repository-url> cd <repository-directory>
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
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.
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.
Annotated
fromtyping
: Provides type annotations for more explicit type hints.TypedDict
fromtyping_extensions
: Used for creating dictionary-like objects with a fixed set of keys.pinecone_query
frompinecone_utils
: Handles querying Pinecone for vector search results.cohere_text_generation
andcohere_rerank
fromcohere_utils
: Utilized for generating and ranking text using Cohere's models.ollama_text_generation
fromollama_utils
: Facilitates text generation using Ollama's models.gemini_text_generation
fromgemini_utils
: Provides text generation capabilities with Gemini's models.StateGraph
,START
, andEND
fromlanggraph.graph
: Manages state transitions and workflows within the legal AI system.add_messages
fromlanggraph.graph.message
: Handles message addition and management in the state graph.ET
fromxml.etree.ElementTree
: Parses and manipulates XML data.
- 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.
- Cohere 🔍: Ranks generated text to ensure the most relevant content is highlighted.
- Pinecone 🌲: Allows efficient querying and retrieval of similar vectors based on legal data.
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.etree.ElementTree 🗂️: Used for parsing and manipulating XML data, which might be necessary for handling legal documents or case files in XML format.
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.
The project is licensed under the MIT License. See the LICENSE file for more details.
For any inquiries or support, please contact [email protected].
© 2024 Legal AI for Bankruptcy Cases. All rights reserved.