- Upload an insurance policy PDF.
- Extract and chunk the policy.
- Build a local TF-IDF retrieval index.
- Detect question intent (coverage, exclusions, claims, documents, waiting period).
- Retrieve relevant policy pages.
- Send only retrieved evidence to Groq Llama.
- Return an evidence-grounded answer with page references.
- Optionally fetch current public health-insurance guidance from the official IRDAI site.
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .envOpen .env and paste your Groq API key.
Then:
python app.py- Use a text-readable PDF for the fastest demo. Scanned/image-only PDFs need OCR.
- The uploaded policy is the primary source for policy-specific answers.
- IRDAI context is general regulatory guidance and does not replace the policy contract.
- Do not put your Groq API key in frontend code or GitHub.