Skip to content

Latest commit

 

History

History
91 lines (65 loc) · 2.4 KB

File metadata and controls

91 lines (65 loc) · 2.4 KB

Contract Advisor RAG

Build and Evaluate A High-Precision Legal Expert LLM APP

Overview

This project aims to develop a high-precision legal expert system for contract Q&A using Retrieval-Augmented Generation (RAG). The system leverages advanced natural language processing (NLP) techniques to provide accurate and context-aware answers to questions about legal contracts and integrates a powerful language model with a custom retrieval mechanism to provide accurate and contextually relevant answers to contract-related queries.

Features

  • Q&A pipeline with RAG using Langchain
  • Customizable retriever and generator components
  • Evaluation framework using RAGAS metrics
  • Optimization techniques for improved performance

Folder Structure

├── data
│   ├── contracts
│   └── Q&A
├── Dockerfile
├── evaluation
│   ├── data_processing.ipynb
│   └── ragas.ipynb
├── flask
│   ├── rag_app.py
│   ├── run.py
│   └── src
├── frontend
│   ├── index.html
│   ├── node_modules
│   ├── package.json
│   ├── package-lock.json
│   ├── public
│   ├── README.md
│   ├── src
│   └── vite.config.js
├── LICENSE
├── notebooks
│   ├── Autogen_agent.ipynb
│   ├── Langchain_exp.ipynb
│   └── simple_RAG_.ipynb
├── README.md
├── requirements.txt
└── scripts
    ├── evaluation.py
    └── utils.py

Installation

  1. Clone the repository
git clone https://github.com/temesgen5335/Legal_Expert_Contract_Advisor_RAG.git
  1. Navigate to project directory
cd Legal_Expert_Contract_Advisor_RAG
  1. Create a virtual environment
python -m venv venv
  1. Activate the environment
source venv/bin/activate  # On Windows, use venv\Scripts\activate
  1. Install the required dependencies:
pip install -r requirements.txt

License

This project is licensed under the Apache License - see the LICENSE file for details.

Challenge by

10 Academy