https://github.com/ShaliniAnandaPhD/PRISM
pRISM is a cutting-edge repository designed to address the complexities of multimodal legal data analysis. By leveraging advanced AI techniques like Retrieval-Augmented Generation (RAG), pRISM integrates multiple language models (OpenAI GPT, Claude 3.5, and Mistral) and employs tools such as FAISS, LangChain, and LoRA fine-tuning. The system provides actionable insights in high-stakes legal domains, particularly in cases involving RICO violations, by mapping threat patterns, validating evidence chains, and aligning evidence to constitutional frameworks.
Note: This repository is for research and demonstration purposes only. No real-world or proprietary data is included.
%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '20px', 'fontFamily': 'arial', 'primaryColor': '#4a90e2', 'primaryTextColor': '#fff', 'primaryBorderColor': '#3375b9', 'lineColor': '#666', 'secondaryColor': '#6cc04a', 'tertiaryColor': '#e57810'}}}%%
flowchart TB
%% Client and API Layer
Client["๐ฅ๏ธ Client Applications"]:::client --> API["๐ API Gateway"]:::gateway
API --> Auth["๐ Authentication"]:::auth
subgraph Core["๐ Core System"]
direction TB
Auth --> DocProcessor["๐ Document Processor"]:::processor
Auth --> QueryHandler["๐ Query Handler"]:::handler
DocProcessor --> Storage[("๐พ Document Storage")]:::storage
DocProcessor --> Indexer["๐ FAISS Indexer"]:::indexer
Indexer --> VectorDB[("๐ฎ Vector Database")]:::vectordb
QueryHandler --> ModelHub["๐ง Model Integration Hub"]:::modelhub
QueryHandler --> VectorDB
ModelHub --> GPT["๐ค OpenAI GPT"]:::model1
ModelHub --> Claude["๐ค Claude 3.5"]:::model2
ModelHub --> Mistral["๐ค Mistral"]:::model3
ModelHub --> Consensus["โ๏ธ Consensus Engine"]:::consensus
end
Consensus --> OutputFormatter["๐ Output Formatter"]:::output
OutputFormatter --> API
%% Style definitions
classDef client fill:#4a90e2,stroke:#3375b9,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef gateway fill:#6cc04a,stroke:#51a035,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef auth fill:#e57810,stroke:#c66a0e,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef processor fill:#9b59b6,stroke:#8e44ad,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef handler fill:#3498db,stroke:#2980b9,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef storage fill:#e74c3c,stroke:#c0392b,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef indexer fill:#f1c40f,stroke:#f39c12,stroke-width:4px,color:black,font-size:24px,font-weight:bold
classDef vectordb fill:#1abc9c,stroke:#16a085,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef modelhub fill:#8e44ad,stroke:#6c3483,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef model1 fill:#2ecc71,stroke:#27ae60,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef model2 fill:#e67e22,stroke:#d35400,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef model3 fill:#3498db,stroke:#2980b9,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef consensus fill:#9b59b6,stroke:#8e44ad,stroke-width:4px,color:white,font-size:24px,font-weight:bold
classDef output fill:#16a085,stroke:#0e6655,stroke-width:4px,color:white,font-size:24px,font-weight:bold
%% Subgraph styles
style Core fill:#f8f9fa,stroke:#dee2e6,stroke-width:4px,color:#333,font-weight:bold
%%{init: {'theme': 'base', 'themeVariables': { 'fontSize': '16px', 'fontFamily': 'arial', 'primaryColor': '#4a90e2', 'primaryTextColor': '#fff', 'primaryBorderColor': '#3375b9', 'lineColor': '#555', 'secondaryColor': '#6cc04a', 'tertiaryColor': '#e57810'}}}%%
flowchart LR
%% Input and Pre-processing
Input[("Input Documents")]:::input --> PreProcess["Pre-processor"]:::preprocess
%% Document Processing subgraph
subgraph Processing["๐ Document Processing"]
direction TB
PreProcess --> TextExtract["Text Extraction"]:::extract
PreProcess --> OCR["OCR Processing"]:::extract
PreProcess --> AudioTrans["Audio Transcription"]:::extract
TextExtract --> Clean["Text Cleaning"]:::clean
OCR --> Clean
AudioTrans --> Clean
Clean --> Chunk["Text Chunking"]:::process
Chunk --> Embed["Embeddings Generation"]:::process
end
%% Storage and Enrichment
Embed --> Store[("FAISS Storage")]:::storage
subgraph Enrichment["โก Data Enrichment"]
direction TB
Store --> EntityExtract["Entity Extraction"]:::enrich
Store --> PatternDetect["Pattern Detection"]:::enrich
Store --> RelationMap["Relationship Mapping"]:::enrich
end
EntityExtract --> Index[("Enriched Index")]:::output
PatternDetect --> Index
RelationMap --> Index
%% Style definitions
classDef input fill:#4a90e2,stroke:#3375b9,stroke-width:2px,color:white,font-weight:bold
classDef preprocess fill:#6cc04a,stroke:#51a035,stroke-width:2px,color:white,font-weight:bold
classDef extract fill:#e57810,stroke:#c66a0e,stroke-width:2px,color:white,font-weight:bold
classDef clean fill:#9b59b6,stroke:#8e44ad,stroke-width:2px,color:white,font-weight:bold
classDef process fill:#3498db,stroke:#2980b9,stroke-width:2px,color:white,font-weight:bold
classDef storage fill:#e74c3c,stroke:#c0392b,stroke-width:2px,color:white,font-weight:bold
classDef enrich fill:#f1c40f,stroke:#f39c12,stroke-width:2px,color:black,font-weight:bold
classDef output fill:#1abc9c,stroke:#16a085,stroke-width:2px,color:white,font-weight:bold
%% Subgraph styles
style Processing fill:#f5f5f5,stroke:#dcdcdc,stroke-width:2px,color:#333,font-weight:bold
style Enrichment fill:#f5f5f5,stroke:#dcdcdc,stroke-width:2px,color:#333,font-weight:bold
Legal cases, particularly those involving RICO violations, often present an overwhelming array of multimodal dataโfinancial transactions, communication logs, legal filings, and multimedia evidence. Analyzing this data manually is time-consuming and error-prone. Moreover, existing AI tools, while powerful, fall short of addressing the complexity of such cases.