AI-Powered Legal Analysis for Illegal Pinjol Promotions Using Indo-LegalBERT and Gemini
Fighting illegal online lending (pinjol ilegal) in Indonesia has become smarter.
This project introduces a cutting-edge, fully automated AI pipeline. It detects, analyzes, and explains promotional content related to illegal lending apps using Indo-LegalBERT and Google Gemini Pro. The pipeline is designed for legal researchers, fintech regulators, and digital policymakers. It combines advanced natural language processing (NLP) with legal reasoning automation. All components are tailored to Indonesian law.
What does it actually do?
The pipeline begins by scraping data from official PDF lists of illegal lending platforms. It extracts URLs and crawls APK stores and websites to gather promotional descriptions. It uses BERTopic and KeyBERT to uncover hidden themes and extract the most relevant keywords in the content.
The smart part of the pipeline is the use of Indo-LegalBERT. It is a specialized language model for Indonesian legal texts. It embeds promotional phrases into a semantic space. Then, it compares them to actual financial regulations. This reveals which parts of the law are being violated without requiring a human to read each post.
To take things further, the system sends those matches to Google Gemini Pro. It automatically generates full legal syllogisms. These are structured legal reasoning that show why something is illegal based on existing rules. It also clusters similar promotions and scores them based on the potential risk.
The result? A transparent tool for understanding how illegal lending works. It is explainable and scalable. It also provides strong insights on how to stop it—all with a clear legal logic.
This tool is not just a research project. It is a public service for digital legal enforcement in the age of AI.
See our pyhton code here: Wahid, S. H. (2025). Indo-LegalBERT and Gemini-based Pipeline for the Legal Analysis of Illegal Pinjol. Zenodo. https://doi.org/10.5281/zenodo.15864578