Skip to content

sreekanthpogula/ragster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

βš–οΈ Ragster: AI-Powered Legal Assistant

Ragster_logo

GitHub Stars GitHub Forks License: Apache 2.0 Python 3.10+ LangChain Crew AI GitHub Issues

Bridging the Gap Between People and Legal Access 🌍

🌐 Website: Ragster

Ragster is a free, open-source, people-centric initiative πŸ’‘ designed to make legal guidance accessible to everyone. Using AI-powered Retriever-Augmented Generation (RAG), Ragster delivers quick, accurate legal support tailored to your needs, whether you're seeking information as a layperson or a professional.

πŸ›‘οΈ Mission: β€œJustice should be accessible to everyone. Ragster ensures that no one is left behind when it comes to legal knowledge.”

This project is developed by Sreekanth Pogula πŸ’Ό alt text alt text


πŸ“š Legal Coverage

Ragster currently supports the following laws, with plans to expand internationally:

  • πŸ›οΈ The Indian Constitution
  • πŸ“œ The Bharatiya Nyaya Sanhita, 2023
  • 🚨 The Bharatiya Nagarik Suraksha Sanhita, 2023
  • 🧾 The Bharatiya Sakshya Adhiniyam, 2023
  • πŸ“¦ The Consumer Protection Act, 2019
  • 🧭 The Motor Vehicles Act, 1988
  • πŸ’» Information Technology Act, 2000
  • πŸ‘§ The Protection of Children from Sexual Offences Act (POCSO), 2012
  • The Sexual Harassment of Women at Workplace (Prevention, Prohibition and Redressal) Act, 2013

Ragster aims to cover legal systems from different countries in the near future.

πŸ’» Developer Quick Start Guide

Ragster Initial Architecture Overview

ragster/
β”œβ”€β”€ config/                  # Configuration directory
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ model_config.yaml    # Model-specific configurations
β”‚   β”œβ”€β”€ prompt_templates.yaml # Prompt templates
β”‚   └── logging_config.yaml  # Logging settings
β”‚
β”œβ”€β”€ assets/                   # Requirements directory
β”‚   β”œβ”€β”€ Ragster_logo.png      # Logo asset
β”‚   β”œβ”€β”€ favicon.ico          # Favicon for web app
|
|--database/                # Database directory
β”‚   β”œβ”€β”€chroma.sqlite3       # ChromaDB database file
β”‚
β”œβ”€β”€ src/                     # Source code
β”‚   β”œβ”€β”€ llm/                # LLM clients
β”‚   β”‚   β”œβ”€β”€ base.py         # Base LLM client
β”‚   β”‚   β”œβ”€β”€ claude_client.py # Anthropic Claude client
β”‚   β”‚   β”œβ”€β”€ gpt_client.py   # OpenAI GPT client
β”‚   β”‚   └── utils.py        # Shared utilities
β”‚   β”‚
β”‚   β”œβ”€β”€ prompt_engineering/ # Prompt engineering tools
β”‚   β”‚   β”œβ”€β”€ templates.py    # Template management
β”‚   β”‚   β”œβ”€β”€ few_shot.py    # Few-shot prompt utilities
β”‚   β”‚   └── chain.py       # Prompt chaining logic
β”‚   β”‚
β”‚   β”œβ”€β”€ utils/             # Utility functions
β”‚   β”‚   β”œβ”€β”€ rate_limiter.py # API rate limiting
β”‚   β”‚   β”œβ”€β”€ token_counter.py # Token counting
β”‚   β”‚   β”œβ”€β”€ cache.py       # Response caching
β”‚   β”‚   └── logger.py      # Logging utilities
β”‚   β”‚
β”‚   └── handlers/          # Error handling
β”‚       └── error_handler.py
β”‚
β”œβ”€β”€ data/                   # Data directory
β”‚   β”œβ”€β”€ cache/             # Cache storage
β”‚   β”œβ”€β”€ prompts/           # Prompt storage
β”‚   β”œβ”€β”€ outputs/           # Output storage
β”‚   └── embeddings/        # Embedding storage
β”‚
β”œβ”€β”€ examples/              # Example implementations
β”‚   β”œβ”€β”€ basic_completion.py
β”‚   β”œβ”€β”€ chat_session.py
β”‚   └── chain_prompts.py
β”‚
β”œβ”€β”€ docs/                  # Documentation
β”‚   β”œβ”€β”€ architecture.md     # Architecture overview
β”‚   β”œβ”€β”€ usage.md            # Usage guide
β”‚   β”œβ”€β”€ api.md              # API documentation
β”‚   └── contributing.md      # Contribution guidelines
β”‚
β”œβ”€β”€ notebooks/              # Jupyter notebooks
β”‚   β”œβ”€β”€ data_preprocessing.ipynb
β”‚   β”œβ”€β”€ llm_integration.ipynb
β”‚   β”œβ”€β”€ prompt_testing.ipynb
β”‚   β”œβ”€β”€ response_analysis.ipynb
β”‚   └── model_experimentation.ipynb
β”‚
β”œβ”€β”€ tests/                  # Unit tests
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ test_llm.py         # LLM client tests
β”‚   β”œβ”€β”€ test_prompt_engineering.py # Prompt engineering tests
β”‚   β”œβ”€β”€ test_utils.py       # Utility function tests
β”‚   └── test_handlers.py    # Error handler tests
β”‚
β”œβ”€β”€ app.py                 # Main application entry point
β”œβ”€β”€ README.md              # Project documentation
β”œβ”€β”€ requirements.txt       # Python dependencies
β”œβ”€β”€ .python-version         # Python version specification
β”œβ”€β”€ .env.example           # Example Environment variables
β”œβ”€β”€ .gitignore             # Git ignore file
β”œβ”€β”€ .pre-commit-config.yaml # Pre-commit hooks configuration
β”œβ”€β”€ .dockerignore          # Docker ignore file
β”œβ”€β”€ .flake8                # Flake8 configuration for linting
β”œβ”€β”€ .pylintrc              # Pylint configuration for code quality
β”œβ”€β”€ .streamlit/            # Streamlit configuration directory
β”‚   β”œβ”€β”€ config.toml         # Streamlit configuration file
β”‚   └── secrets.toml         # Streamlit secrets file
β”œβ”€β”€ .vscode/               # Visual Studio Code settings
β”‚   β”œβ”€β”€ settings.json        # VS Code settings
β”‚   β”œβ”€β”€ launch.json          # Debugging configuration
β”‚   └── tasks.json           # Task runner configuration
β”œβ”€β”€ .github/               # GitHub workflows and issue templates
β”‚   β”œβ”€β”€ workflows/           # GitHub Actions workflows
β”‚   β”‚   β”œβ”€β”€ ci.yml            # Continuous Integration workflow
β”‚   β”‚   └── deploy.yml        # Deployment workflow
β”‚   └── ISSUE_TEMPLATE/       # Issue templates
β”‚       β”œβ”€β”€ bug_report.md     # Bug report template
β”‚       └── feature_request.md # Feature request template
β”‚
β”œβ”€β”€ setup.py               # Setup script for packaging
β”œβ”€β”€ CONTRIBUTING.md        # Contribution guidelines
β”œβ”€β”€ CHANGELOG.md           # Change log for version history
β”œβ”€β”€ Dockerfile             # Dockerfile for containerization    
└── LICENSE                # License file

πŸš€ Getting Started with Ragster

Ready to get started? Follow these simple steps to set up Ragster on your machine:

  1. Clone the Repository πŸŒ€

    git clone https://github.com/Ragster/Ragster.git
  2. Install uv πŸ“‚

    First, let’s install uv and set up our Python project and environment

    MacOS/Linux:

    curl -LsSf https://astral.sh/uv/install.sh | sh

    Windows:

    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

    Make sure to restart your terminal afterwards to ensure that the uv command gets picked up.

  3. Install Dependencies πŸ“¦

    uv sync
  4. Set Your OpenAI API Key πŸ”‘

    Open .env and add your OpenAI API key:

    OPENAI_API_KEY=your-api-key-here
  5. Run the Application πŸš€

    uv run streamlit run app.py
  6. Access the App 🌐
    Open your browser and visit:

    http://127.0.0.1:8501

πŸ”§ Tools & Technologies

πŸ’‘ Technology πŸ” Description
LangChain Framework for building language models
ChromaDB Vector database for RAG implementation
OpenAI API Powering natural language understanding

🌟 Future Roadmap

Exciting developments are planned for Ragster! Here’s what’s coming next:

  1. 🀝 Smarter Together: Introducing Our Multi-Agentic Framework πŸ€–

    • Imagine a team of specialized AI agents working seamlessly in the background to provide you with the most comprehensive and efficient legal insights. Our new multi-agent framework makes this a reality, boosting platform performance like never before!
  2. 🌎 Law Without Borders: Expanding Our Global Reach πŸ‡¨πŸ‡¦ + More!

    • Ragster is going global! We're significantly expanding our legal knowledge base to include jurisdictions like Canada and beyond. Soon, you'll have access to a truly worldwide legal resource at your fingertips.
  3. πŸ—£οΈ Your Voice is the Key: Introducing Voice Interaction πŸŽ™οΈ

    • Navigate and access legal information effortlessly with our new voice command feature. Simply speak your queries and let Ragster do the rest – making legal research more intuitive and accessible.
  4. 🌍 Bridging Language Barriers: Multi-Lingual Legal Assistance 🌐

    • We're committed to serving a global audience. Ragster will soon offer legal assistance in multiple languages, breaking down communication barriers and making our platform truly inclusive.
  5. 🎯 Precision & Personalization: Advanced Search & Tailored Assistance πŸ”

    • Say goodbye to endless scrolling! Our enhanced search engine will pinpoint the exact legal information you need with lightning speed. Plus, enjoy personalized suggestions and assistance crafted just for you.
  6. ✍️ Draft with Confidence: Introducing Legal Document Generation πŸ“„

    • Need a contract or agreement? Our upcoming legal document generation feature will empower you to create essential legal documents using customizable templates and intuitive user input.
  7. πŸ—“οΈ Stay Organized, Stay Ahead: Introducing Case Management πŸ“

    • Effortlessly manage your legal matters with our new case management feature. Track crucial deadlines, appointments, and important events all in one centralized location, keeping you in control.

🀝 Contribute

We are always looking for contributors! Whether you want to help with development, report issues, or request features, we welcome you to fork the repo and submit a pull request. Every contribution helps to make Ragster better for everyone! see CONTRIBUTING.md for more details.


Ragster is more than just an AI toolβ€”it's a movement to democratize access to legal knowledge for everyone. Together, let’s make justice truly accessible! ✨

πŸ“œ License

This project is licensed under the Apache License 2.0. See the LICENSE file for more information.

About

Ragster is a free, open-source, people-centric initiative πŸ’‘ designed to make legal guidance accessible to everyone. Using AI-powered Retriever-Augmented Generation (RAG), Ragster delivers quick, accurate legal support tailored to your needs, whether you're seeking information as a layperson or a professional.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors