Context
Built in a 2-person internship team for LawAndGood via the Likelion Rocket program.
The company needed a way to discover legal-dispute signals faster and review candidate cases with more consistency than a manual news search workflow.
Problem To Solve
- → Manual keyword search limited coverage and made monitoring dependent on individual effort
- → Relevance review was slow because analysts had to read, compare, and triage articles one by one
- → The team needed a structured way to connect article collection, AI judgment, and case review
What I Built
- → News collection flow using Naver News API as the primary source
- → Article parsing and cleanup with BeautifulSoup4
- → Gemini-based classification flow for dispute relevance and risk labeling
- → Pydantic schemas to validate structured LLM output
- → Django-based review interface for monitoring cases and article matches
- → PostgreSQL storage for article history, classifications, and monitoring results
What I Did
- → Designed the article collection and parsing flow around Naver News API and BeautifulSoup4
- → Implemented the Gemini-based relevance classification pipeline with validated outputs
- → Built the backend review workflow for article-to-case monitoring
- → Structured storage for article history, analysis results, and review state in PostgreSQL
Architecture
Four separated stages: collect → parse → classify → review.
Each stage has a single responsibility; Pydantic validation sits between Gemini and PostgreSQL so unstructured AI output never reaches the DB directly.
Pipeline
Naver News API
primary article discovery source ↓ collect
BeautifulSoup4
parse · extract body · clean HTML ↓ cleaned text
Gemini API
relevance_score · risk_label · summary ↓ structured output
Pydantic
schema validation · safe to write ↓
PostgreSQL
articles · analyses · cases · case_articles ↓
Django Review UI
monitor · triage · case-article matching Outcome
Delivered as a working proof of concept. The result turned manual legal-news scanning into a more structured monitoring workflow,
making it easier to collect signals, classify relevance, and review candidate cases inside one system.
Technical Notes
Pipeline Notes
- Naver News API is used as the primary discovery source for legal-news collection.
- BeautifulSoup4 cleans and extracts article bodies before AI analysis.
- Gemini classification output is validated through Pydantic before being saved for review.
Data Model Snapshot
articles
- id
- source_url
- title
- published_at
analyses
- article_id
- relevance_score
- risk_label
- summary
cases
- id
- case_name
- status
case_articles
- case_id
- article_id
- match_reason