An AI governance chatbot powered by Llama 3 via Groq. Ask it anything about the EU AI Act, GDPR, or ISO 42001 and it returns a plain-English answer with the relevant article or clause cited.
Most governance documentation is dense and hard to navigate. This chatbot makes AI policy frameworks accessible — paste in a question and get a structured, cited answer in seconds.
Frameworks covered:
- EU AI Act (risk tiers, obligations, prohibited practices)
- GDPR (all major data subject rights and articles)
- ISO 42001 (AI management system requirements)
- NIST AI Risk Management Framework
Q: What are the obligations for a High Risk AI system under the EU AI Act?
Returned: Conformity assessment (Article 6), risk management system (Article 9), data governance (Article 10), transparency (Article 13), human oversight (Article 14), continuous monitoring (Article 17).
Q: What is Article 17 of GDPR and when does it apply?
Returned: Right to erasure applies when data is no longer necessary, consent is withdrawn, data has been unlawfully processed, or data was collected from a child (Article 17(1)(a)-(f)).
Q: What does ISO 42001 say about AI risk management?
Returned: Clause 6.1.2 requires organisations to identify, assess and mitigate AI-related risks. Clause 9.3 requires ongoing monitoring and review of the risk management approach.
Q: A company wants to use AI to screen job applicants. What are their obligations under the EU AI Act?
Returned: Classified as High Risk under Annex III (employment category). Requires risk assessment (Article 9), transparency measures (Article 13), human oversight (Article 14), and GDPR compliance.
| Layer | Technology |
|---|---|
| LLM | Llama 3.3 70B via Groq API |
| API | FastAPI |
| Prompt engineering | System prompt with governance context and citation instructions |
| Language | Python 3.11+ |
ai-policy-chatbot/
├── main.py # FastAPI app and /ask endpoint
├── chatbot.py # Groq client, system prompt, and response logic
├── requirements.txt
├── .gitignore
└── README.md
git clone https://github.com/ShivamKumar20-AI/ai-policy-chatbot.git
cd ai-policy-chatbot
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtCreate a .env file:
GROQ_API_KEY=your_groq_api_key_here
Get a free API key at console.groq.com — no billing required.
Run the API:
uvicorn main:app --reloadPOST /ask
curl -X POST "http://127.0.0.1:8000/ask" \
-H "Content-Type: application/json" \
-d '{"question": "What are the obligations for a High Risk AI system under the EU AI Act?"}'{
"question": "What are the obligations for a High Risk AI system under the EU AI Act?",
"answer": "Under the EU AI Act, High-Risk AI systems must comply with Article 9 (risk management), Article 10 (data governance), Article 13 (transparency), Article 14 (human oversight), and Article 17 (monitoring)...",
"disclaimer": "This response is for guidance and portfolio demonstration only. It does not constitute legal advice."
}- Answers are generated by an LLM and may not reflect the latest legislative amendments.
- Not a substitute for legal advice or formal compliance review.
- Intended for learning, portfolio demonstration, and governance triage.
Shivam Kumar — AI Governance Analyst & ML Engineer