VisaCompanion is a local tool that helps legal professionals and EB-1A petitioners identify weaknesses in their immigration petition drafts before submission. It simulates a USCIS adjudicator’s feedback using a lightweight open-source language model mistral running locally via Ollama.
- AI-powered analysis of EB-1A petition content
- Section-by-section feedback modeled after USCIS RFE criteria
- 📄 Supports
.docx,.pdf, and.txtfiles - Runs entirely offline — no internet or API keys required
Risk-Analyzer/
├── main.py # Analyzer pipeline
├── scraper.py # Downloads USCIS, AAO, Reddit data
├── sample_data/ # Petition input file(s)
├── outputs/ # Final Word report + chart
├── knowledge_base/
│ ├── raw/aao/ # Downloaded AAO decision PDFs
│ └── processed/ # Extracted JSON knowledge
├── src/
│ ├── parser.py
│ ├── risk_detector.py
│ └── report_generator.py
├── requirements.txt
└── README.md
- Python 3.8 or higher
- Ollama (to run the LLM locally)
- At least 8 GB of RAM
- Microsoft Word or Google Docs (to open output files)
Before you run the analyzer, you must scrape the official EB-1A resources into the local knowledge base.
python scraper.pyDownload the installer from:
https://ollama.com/download
Install and restart your terminal (or PowerShell) afterward.
In your terminal or PowerShell, run:
ollama pull mistralTo start the model, open a new terminal window and run:
ollama run mistralKeep this terminal running. It hosts the LLM in the background while your tool runs.
In your main project folder, run:
pip install -r requirements.txtThis will install all dependencies .
Save your .docx or .pdf petition draft inside the sample_data/ folder.
In your terminal, from the root of the project, run:
python main.pyThis will take a whileee
After completion, the feedback report will be saved at:
outputs/rfe_risk_report.docx
Open it in Microsoft Word or Google Docs to view the analysis.
Each analyzed section contains:
- The EB-1A criterion name
- Your original petition content
- AI-generated insights:
- Weaknesses in evidence or phrasing
- Missing elements that may trigger RFE
- Suggestions to strengthen the section