Repository navigation
Enhance FAISS index handling and UI for MIT AI Risk Repository - #27
Open
aravind-3105 wants to merge 16 commits into
Open
aravind-3105 wants to merge 16 commits into
aravind-3105 wants to merge 16 commits into
Conversation
Add argparse defaults for V4 export filenames and document the data/raw download workflow.
Add sync_package_indexes.py and document the step after build_faiss_indexes.py.
Expose --device auto|cpu|cuda on build_faiss_indexes so GPU nodes can embed faster; document CUDA usage in data/raw README.
Add risk_corpus metadata, mit-risk-index page, and update docs/API copy for 1,538 risks while noting JOSS v0.2.2 remains on the V3 snapshot.
Ship 1,538 risk and 5,993 RMF vectors in package and data/indexes artifacts produced from the December 2025 MIT export.
Route /v1 to the backend on the compute host so SSH-forwarding only port 5173 works; surface fetch errors in the analyze banner.
Bump to 0.3.0, add regression tests for corpus metadata and sync layout, and document JOSS vs Zenodo citation practice in README and API docs.
Replace global FAISS RMF search (which returned duplicate template GOVERN lines) with per-risk lookup from packaged rmf_meta.json.
Wire POST /v1/batch for text and risk modes; JSON/CSV downloads; surface linked NIST AI RMF functions per risk; expose joined_table on RiskResult.
Dedupe risk cards by id/category; corpus badge on Risk tab; batch CSV upload/progress/combined export; four RMF functions by default; clarify template RMF provenance in docs and UI tooltips.
Keep .env.vector, .env.local, and local/ off the repo while allowing in-cluster OpenAI-compatible proxy testing without accidental commits.
Send explicit workflow hints for text bias, close stale WebSockets, and surface stream errors. Show an in-progress panel until completion and render bias_result errors/warnings instead of an empty insights card.
Allow a small checked-in sample so batch risk runs can be tried without exporting local outputs that stay gitignored.
Add _typos.toml for EHR in examples, fix ruff line length and docstrings in scripts, skip optional data/indexes sync check on CI, align risk graph tests with default four RMF rows per risk, and normalize paper EOF.
shainarazavi
approved these changes
Nov 15, 2026
shainarazavi
left a comment
Collaborator
There was a problem hiding this comment.
I have seen it thoroughly and tested , it looks good to me to merge
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ship MIT AI Risk Repository V4 in the bundled FAISS indexes (1,538 risks / expanded RMF metadata), fix per-risk RMF lookups (no duplicate GOVERN spam), expose corpus version on health, and upgrade the web UI for risk batch runs, exports, RMF disclosures, and more reliable single-run streaming. Bumps package version to 0.3.0. JOSS paper remains tied to V3 counts; cite Zenodo per release for reproducible V4 data.
Clickup Ticket(s): N/A
Type of Change
Changes Made
--device, sync intofairsense_agentix/data/indexes/;risk_corpus.pymetadata for V4.rmf_lookup.py+ retrieval changes so RMF actions resolve by MIT risk id instead of global FAISS neighbors; illustrative NIST template disclaimer.software_version, MIT corpus version, snapshot date, indexed risk count;RiskResult.joined_tablefor exports./v1proxy; batch POST + CSV upload, progress, JSON/CSV export; risk dedupe, corpus badge, RMF tooltips; About modal index info; in-progress panel + WebSocket hardening; failed bias runs showerrors/warnings.mit-risk-index.md, DATA_FORMAT / user guide updates;examples/batch_risk_scenarios.csv; gitignore forlocal//.env.vector.0.3.0+uv.locksync.Testing
uv run pytest tests/)uv run mypy <src_dir>)uv run ruff check src_dir/)Manual testing details:
python -m fairsense_agentix.service_api+cd ui && npm run dev(Vite proxy, single port 5173).examples/batch_risk_scenarios.csv, progress bar, combined JSON/CSV export./v1/healthshows version and MIT index metadata.Screenshots/Recordings
Related Issues
Relates to MIT AI Risk Repository V4 indexing and post-JOSS release 0.3.0 (Zenodo DOI when tagged).
Deployment Notes
fairsense_agentix/data/indexes/*.scripts/transform_mit_data.py→build_faiss_indexes.py→sync_package_indexes.py(see docs).paper/intentionally not updated for V4 row counts.VITE_API_BASEwhen using dev proxy; on HPC usemodule load nodejs(not~/.local/bin/node)..envonly (not committed).Checklist