lubnaAr/ai_incident_helper
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
AI Incident Helper - Automatic Extraction and structured reports
Description:
Takes the raw incident descriptions , extracts the key entities (perpetrators, locations , violations ) , generates a structured incident report
and let the users submit their Feedback
AI powered agents that takes raw incident descriptions and generate a strcutured incident reports. It saves out the time in manually filling up the data
Features:
1. Text cleaning
2. LLM driven entity Extraction
3. Full incident report generation
4. Feedback logging
5. Console UI for interactive use
Concepts Applied
1. Multi-Agent System (Sequential)
- A sequential multi-agent pattern has been used
- Cleaning Agent : Normalize and tokenize text
- Extraction Agent : LLM-based entity extraction (perpetrators, locations , violations)
- Feedback logger
WorkFlow: Cleaning -> Extraction -> Feedback
2. Sessions and Memory (State + Memory Bank)
- Session :
- Memory :
3. Observability and Agent Evaluation
report_structuring_agent/
│
├── cleaning_agent.py # Normalization & token cleaning
├── extraction_agent.py # LLM-based entity extraction
├── indexing_agent.py # Searchable storage
├── console_app.py # Interactive CLI app
├── evaluation.py # Gold test evaluation
├── generated_reports/ # Output incident reports
└── customer_feedback.txt # Feedback logs
Setup Instructions
brew install ollama
ollama pull llama3.2
Usage Instructions
1. Run the following command from the source code location folder
python3 console_app.py
2. Provide the incident description
Enter incident description: John shouting at desk
...
Entities:
Perpetrators : John
Locations : desk
Violations : shouting
Feedback Handling
After each report the user can mark wrong extraction fields.
Feedback is apended to customer_feedback.txt for auditing, model improvement or future fine tuning
Limitations
1. Extractor accuracy depends on LLM quality
2. No UI yet (console only)