How kyanqueso/thesis_clean works
This repository combines an indirect-prompt-injection research pipeline with a local dashboard for exploring results, running retraining jobs, and testing saved classifiers. The research workflow builds datasets, embeds context/intent pairs, trains and evaluates classifiers, and stores run artifacts; the dashboard discovers those artifacts and exposes analysis and live detection. The main pipeline stages are documented, but several implementation files were not sampled, so their internal connections are omitted unless supported by the README or source index.
Main entry points: server.py Dashboard API · run_all_pipelines.py Pipeline sweep · train_evaluate_visualize.py Train and evaluate · detect.py Live detection
Components 19
Research pipeline
- Dataset preparation
src/organic_dataset.py - Email anonymization
src/anonymize_enron.py - Pair embeddings
src/generate_embeddings.py - Train and evaluate
src/train_evaluate_visualize.py - Pipeline sweep
src/run_all_pipelines.py - Progress markers
src/progress.py
Dashboard
- Dashboard API
app/server.py - Dashboard UI
app/static/app.js - Live detection
app/detect.py - Run job queue
app/jobs.py - Settings
app/settings.py
Artifacts and paths
- Run analysis
app/runs.py - Dashboard paths
app/paths.py - Tree resolver
pipeline_paths.py - Run artifacts
External integrations
- OpenAI API
- Vast.ai worker
app/vast.py
Other components
- Engineer
- Browser
Connections 22
- Engineer → Browser: uses dashboard
README.md - Browser → Dashboard API: requests API
README.md - Dashboard API → Run analysis: queries runs
app/server.py - Dashboard API → Live detection: requests detection
app/server.py - Dashboard API → Run job queue: manages jobs
app/server.py - Dashboard API → Settings: updates settings
app/server.py - Dashboard API → Vast.ai worker: tests connection
app/server.py - Run analysis → Dashboard paths: resolves artifacts
app/runs.py - Dashboard paths → Tree resolver: uses tree locations
app/paths.py - Run job queue → Pipeline sweep: launches sweep
app/jobs.py - Pipeline sweep → Pair embeddings: runs embedding stage
src/run_all_pipelines.py - Pipeline sweep → Train and evaluate: runs evaluation stage
src/run_all_pipelines.py - Pipeline sweep → Run artifacts: writes run outputs
README.md - Train and evaluate → Run artifacts: saves models and results
README.md - Run analysis → Run artifacts: reads run data
app/runs.py - Live detection → Run artifacts: loads saved classifiers
app/detect.py - Live detection → OpenAI API: embeds text
app/detect.py - Run job queue → Vast.ai worker: dispatches remote embedding
app/jobs.py - Pair embeddings → Progress markers: emits progress
src/generate_embeddings.py - Train and evaluate → Progress markers: emits progress
src/train_evaluate_visualize.py - Email anonymization → Dataset preparation: scrubs source text
src/anonymize_enron.py - Browser → Dashboard UI: loads interface