Jaykumaran R fe6e44e5c4 lightrag-code-updates 3 bulan lalu
..
media fe6e44e5c4 lightrag-code-updates 3 bulan lalu
README.md fe6e44e5c4 lightrag-code-updates 3 bulan lalu
gradio_lightrag_querying.py fe6e44e5c4 lightrag-code-updates 3 bulan lalu
ollama_llama.py fe6e44e5c4 lightrag-code-updates 3 bulan lalu

README.md

LightRAG For Legal Document Analysis

This folder contains the Scripts and Index files for the LearnOpenCV article - LightRAG: Simple and Fast Retrieval-Augmented Generation for Legal Doc Analysis.

PDF Samples Used:

Indexed Json Storage File for Above Docs Download:

  • We are providing indexed files of the vector database and JSON key-value storage for the PDF samples, processed with a chunk size of 1,200 tokens and an LLM context size of 32,000 tokens during the graph indexing stage of LightRAG. The processing utilized the llama3.1:latest 8b model and the nomic-embed-text model from the Ollama Hub. You can download this from this Dropbox Link. This simplifies if you like to immediately see some results at start without spending time about an hour to test it out. Feel free to try indexing on your own files and model configs.
  • There is also a simple gradio_lightrag_querying.py file
  • The experiments were conducted on a RTX3080 12GB VRAM with i7 13th Gen. To prevent OOM error we have set up llm num_ctx: 16000 as it may throw CUDA error while querying in hybrid mode.

Instructions:

  • git clone https://github.com/HKUDS/LightRAG.git

cd LightRAG pip install -e .

  • Setup ollama locally and ollama pull llama3.1:latest

  • Open a new terminal ollama serve to monitor logs.

Download Code

AI Courses by OpenCV

Want to become an expert in AI? AI Courses by OpenCV is a great place to start.

img