Nike-one/BharatLAW ? reverse-engineered prompt
Reverse engineered prompt
Build me a Streamlit web app called BharatLAW that helps people ask questions about the Indian Penal Code and get clear, helpful answers from a legal knowledge base. I want a simple chat interface where a user can type a legal question, see the conversation history, and get responses based on retrieved IPC text rather than random guesses.
Also add a separate ingestion script that reads legal text files from a data folder, splits them into chunks, creates embeddings with a Hugging Face model like InLegalBERT, and stores them in a FAISS index for fast retrieval. The app should load that index and use it to find the most relevant passages before answering.
Please make it easy to run locally with a requirements file, a clean Streamlit layout, and a footer. Use an environment variable for the Together AI key. Keep the tone professional and make it clear this is for educational guidance, not a replacement for a real lawyer. If anything is unclear, look up the current docs online and wire it up sensibly.
Are you gonna build this?
make sure you review the code using coderabbit