Skip to content

DataFinFreak/ipc-rag-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

IPC RAG Chatbot βš–οΈπŸ€–

A Retrieval-Augmented Generation (RAG) chatbot built using LangChain 1.x that enables conversational querying over the Indian Penal Code (IPC).

πŸš€ Features

  • PDF ingestion and text extraction
  • Semantic chunking using RecursiveCharacterTextSplitter
  • OpenAI embeddings
  • Chroma vector database
  • Conversational RAG pipeline
  • Persistent vector storage

πŸ— Architecture

PDF β†’ Chunking β†’ Embeddings β†’ ChromaDB β†’ Retriever β†’ LLM β†’ Response

πŸ›  Tech Stack

  • Python
  • LangChain 1.x
  • OpenAI Embeddings
  • ChromaDB

πŸ’¬ Sample Queries

  • What is the section related to unlawful assembly?
  • What is the punishment for that?
  • Which section deals with counterfeiting currency-notes?

πŸ§ͺ How to Run

  1. Clone this repository
  2. Install dependencies: pip install -r requirements.txt
  3. Set your OpenAI API key
  4. Run: python app.py

πŸ“Έ Sample Output

image

⚠ Disclaimer

This chatbot is for educational purposes only and does not provide legal advice.

About

RAG chatbot over Indian Penal Code using LangChain

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages