Loose collection of CLI scripts: corpus operations, data uploads, probes, KB regeneration, scheduled-job runners. Nothing under tools/ is imported by the live server β backend/ and rag/ are the runtime surface.
Scheduling for the long-running ones is wired via macOS LaunchAgents β see CRON_README.md in this folder for cadence + script paths, and ADR-029 for the disk-safety LaunchAgents.
Push specific slices of rag/ to the companion HF Dataset rohitsar567/insurance-bot-data. See ADR-020 and ADR-024.
set_hf_secrets.py
One-shot helper that pushes the runtime secrets into the HF Space (idempotent). Current secret set: GOOGLE_API_KEY (Google AI Studio, per ADR-040), NVIDIA_NIM_API_KEY, OPENROUTER_API_KEY, SARVAM_API_KEY, plus admin password / IP allowlist.
Historical Groq Llama free-tier probe β Groq is no longer in any production chain (removed in ADR-038, not re-added in ADR-040). Kept for benchmarking.
openrouter_probe.py, or_models.py
OpenRouter routing + model-list inspection. Used by KI-178 to audit which :free models expose response_format.
pdf_probe.py
pdfplumber parse on a single PDF β first stop when extraction silently produces empty text.
heavy_smoke_test.py
End-to-end smoke against the live HF Space (every provider in one call).
Chunk-size & retrieval sweeps
Script
Purpose
chunk_sweep.py, chunk_sweep_diagnostic.py
Grid-search over chunk size / overlap. Output: eval/chunk_sweep_results.json. See ADR-018.
sweep_retrieval.py
Retrieval-strategy A/B (filter vs no-filter, top-k variants).
Scheduled jobs / shell wrappers
Path
Purpose
install_crons.sh, CRON_README.md
Install the LaunchAgents; the README is the canonical cadence + path reference.