Skip to content

SURFLOU/RAGlaw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAGlaw Project Documentation

Overview

This project is RAG model that embedds Polish's Penal Code and answers questions with gpt-4o-mini LLM model. It's deployed on the Azure Kubernetes Service (AKS) ChatUI

Architecture

Application architecture

Main components

rag-api

The 'rag-api' is API written in FastAPI that is serving as a backend service for the RAG communication. It consists of one POST Endpoint that retrieves the relevant context in Milvus DB, feeds it into LLM and returns the LLM answer based on that context

frontend

The 'frontend' is streamlit application that communicates with the rag-api and provide user-friendly interface to chat with RAG model

ingesting

The 'ingesting' is Argo Workflows's workflow that chunks Polish's Penal Code, embedds it and stores the embeddings in Milvus Vector Database

kubernetes

Application is designed to run on kubernetes' pods

terraform

Azure Kubernetes Cluster (AKS) is deployed using terraform

Getting Started

Prerequisites

Deployment Steps

  1. Terraform Deployment

    • Navigate to the terraform directory.
    • Create terraform.tfvars file and assign values
      resource_group_name     = "law-rag-model-rg"
      resource_group_location = "West US"
      aks_name                = "law-rag-model-aks"
      dns_prefix              = "law-rag-model-dns"
      node_count              = 1
      vm_size                 = "Standard_B2s"
      os_disk_size_gb         = 32
      subscription_id         = "<YOUR_SUBSCRIPTION_ID>"
    • Initialize Terraform:
      terraform init
    • Apply the Terraform configuration to deploy the AKS cluster:
      terraform apply
  2. Application Deployment

    • Navigate to the deploy directory.
    • Use Helm to deploy the application:
      helm install <release-name> ./helm-chart
    • Alternatively, apply the Kubernetes YAML files:
      kubectl apply -f sample.yaml -n namespace

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published