π 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 πΌ

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.
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
Ready to get started? Follow these simple steps to set up Ragster on your machine:
-
Clone the Repository π
git clone https://github.com/Ragster/Ragster.git
-
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 | shWindows:
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.
-
Install Dependencies π¦
uv sync
-
Set Your OpenAI API Key π
Open
.envand add your OpenAI API key:OPENAI_API_KEY=your-api-key-here
-
Run the Application π
uv run streamlit run app.py
-
Access the App π
Open your browser and visit:http://127.0.0.1:8501
| π‘ Technology | π Description |
|---|---|
| LangChain | Framework for building language models |
| ChromaDB | Vector database for RAG implementation |
| OpenAI API | Powering natural language understanding |
Exciting developments are planned for Ragster! Hereβs whatβs coming next:
-
π€ 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!
-
π 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.
-
π£οΈ 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.
-
π 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.
-
π― 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.
-
βοΈ 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.
-
ποΈ 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.
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! β¨
This project is licensed under the Apache License 2.0. See the LICENSE file for more information.
