How aasrithadevireddy/privacy-budget-autopilot-for-company-copilot works
Privacy Budget Autopilot is an employee-facing company assistant with role-filtered document answers, coding help, privacy-budget enforcement, and administrator oversight. Employees activate or log in through the web UI, submit a chat request, and receive an answer or a refusal/escalation; chat decisions also update persistent budget and audit records. The repository additionally includes synthetic-data generation and a PPO training/evaluation path whose model recommendations remain subject to backend policy checks. Source excerpts do not expose all API internals, so unsampled subsystem links are included only where documented.
Main entry points: main.py Assistant API · db.py Application database · seed.py Synthetic data seeding · security.py Identity and sessions
Components 17
Employee experience
- Web application
frontend/src/App.tsx
Assistant service
- Assistant API
backend/app/main.py - Authorized retrieval
backend/app/main.py - Answer generation
backend/app/main.py
Privacy governance
- Identity and sessions
backend/app/security.py - Policy enforcement
backend/app/policy.py - PPO inference
backend/app/ppo.py - Budget and audit
backend/app/main.py
Data and learning
- Domain records
backend/app/models.py - Application database
backend/app/db.py - Synthetic data seeding
backend/app/seed.py - Employee exports
data/employees/employees.csv - Knowledge export
data/generated/company_knowledge_base.csv - PPO training
backend/app/train.py - PPO checkpoint
models/privacy_ppo.pt
Other components
- Employee
- OpenAI provider
Connections 19
- Employee → Web application: uses
README.md - Web application → Assistant API: calls API
frontend/src/App.tsx - Assistant API → Identity and sessions: authenticates
backend/app/main.py - Assistant API → Authorized retrieval: routes requests
README.md - Assistant API → Answer generation: handles chat
README.md - Authorized retrieval → Application database: reads authorized docs
README.md - Answer generation → OpenAI provider: optionally calls
README.md - Assistant API → Policy enforcement: checks decisions
backend/app/main.py - Assistant API → PPO inference: gets recommendation
backend/app/main.py - Assistant API → Budget and audit: records outcome
backend/app/main.py - Budget and audit → Application database: writes transactions
backend/app/main.py - Identity and sessions → Application database: reads sessions
backend/app/security.py - Identity and sessions → Domain records: uses employee records
backend/app/security.py - Domain records → Application database: maps records
backend/app/models.py - Synthetic data seeding → Application database: populates records
backend/app/seed.py - Synthetic data seeding → Employee exports: exports registry
backend/app/seed.py - Synthetic data seeding → Knowledge export: exports documents
README.md - PPO training → PPO checkpoint: writes checkpoint
README.md - PPO inference → PPO checkpoint: loads model
backend/app/ppo.py