How viswandh-crypto/rag-based-legal-assistant-chatbot-streamlit works
This is a single-file Streamlit legal-document assistant. Its runtime workflow accepts a court-order PDF, loads and splits it, indexes page content, then answers user questions through retrieval and a Gemini-backed document chain; answers and chat history appear in the UI. The README also advertises summary, petitioner, liquidator-observation, and deadline actions, but those actions are not present in the sampled source, so they are shown as documented capabilities rather than verified runtime stages.
Main entry points: Legal_Assistant_Chatbot_Streamlit.py Streamlit chat UI
Components 10
User interface
- Streamlit chat UI
Legal_Assistant_Chatbot_Streamlit.py - Chat history
Legal_Assistant_Chatbot_Streamlit.py
Document retrieval
- PDF page loader
Legal_Assistant_Chatbot_Streamlit.py - Sentence embeddings
Legal_Assistant_Chatbot_Streamlit.py - FAISS index
Legal_Assistant_Chatbot_Streamlit.py - Page retriever
Legal_Assistant_Chatbot_Streamlit.py
Answer generation
- Legal prompt chain
Legal_Assistant_Chatbot_Streamlit.py - Gemini model
- Document Q&A actions
Legal_Assistant_Chatbot_Streamlit.py
Other components
- Legal user
Connections 11
- Legal user → Streamlit chat UI: uploads PDF / asks
Legal_Assistant_Chatbot_Streamlit.py - Streamlit chat UI → PDF page loader: loads and splits
Legal_Assistant_Chatbot_Streamlit.py - Streamlit chat UI → Sentence embeddings: creates vectors
Legal_Assistant_Chatbot_Streamlit.py - Streamlit chat UI → FAISS index: indexes pages
Legal_Assistant_Chatbot_Streamlit.py - Streamlit chat UI → Page retriever: configures retrieval
Legal_Assistant_Chatbot_Streamlit.py - Streamlit chat UI → Legal prompt chain: builds chain
Legal_Assistant_Chatbot_Streamlit.py - Page retriever → FAISS index: searches pages
Legal_Assistant_Chatbot_Streamlit.py - Legal prompt chain → Gemini model: uses model
Legal_Assistant_Chatbot_Streamlit.py - Streamlit chat UI → Chat history: reads and updates
Legal_Assistant_Chatbot_Streamlit.py - Streamlit chat UI → Document Q&A actions: offers quick actions
README.md - Document Q&A actions → Legal prompt chain: asks document questions
README.md