Files
llmiotsafe/EGP/README.md
2026-05-12 17:01:39 +08:00

817 B

EGP

Evidence-Guided Pipeline for SafeHome anomaly reasoning.

Design

  • api_client.py: OpenAI-compatible API client with optional API key.
  • benchmark.py: episode collection and resume helpers.
  • evidence.py: deterministic evidence compression from raw long logs.
  • prompts.py: two-stage prompts for hypothesis generation and final verification.
  • pipeline.py: end-to-end episode evaluation with EGP.
  • run_egp.py: CLI runner with resume and --max-episodes support.

Example

python EGP/run_egp.py \
  --model Qwen/Qwen3.5-9B \
  --api-base http://localhost:8000/v1 \
  --max-episodes 5 \
  --workers 2

Local vLLM does not need --api-key.

Preview one episode without API calls:

python EGP/run_egp.py --preview-only --max-episodes 1 --output-dir results/egp_preview