Inspiration
Shipping the same feature across regions kept triggering late-stage legal feedback and painful refactors. Teams needed a lightweight first-cut compliance check to spot geo risks early, with explanations they could trust. We wanted decisions that are fast, cited, and auditable—not just “LLM vibes.”
What it does
The geo-compliant assistant acts as a lightweight assistant that determines whether a proposed product feature needs geo-specific compliance logic. Users submit a feature name/description and optionally attach regulatory documents, and the assistant flags if the feature has geo-compliance logic
How we built it
• Stack: Python, FastAPI (REST), Streamlit (UI), LangGraph + LightRAG (agentic retrieval), PostgreSQL (storage).
• Graph: Two nodes—InputCheck → LightRAGDecision → DB log.
• Prompts/templates: Role-guided prompts for clarifiers and evidence-linked answers; retrieval tuned for short regulatory snippets.
• API-first: /features/review, /features/{id}/decision, /features/{id}/clarify; UI sits on top.
Challenges we ran into
Ambiguous inputs: Teaching the evaluator to ask specific follow-ups, not generic “tell me more.” Precision vs. latency: Keeping responses snappy while avoiding over-flagging. Traceability: Designing a DB schema that makes audits easy without storing raw sensitive docs.
Accomplishments that we're proud of
- Completing this project in a 3 man team in a short amount of time
- Human-in-the-loop clarifications that meaningfully improve accuracy.
- Build a simple demo UI that can showcase the benefits of the workflow
What we learned
- A small front-door check prevents big back-end refactors.
- Retrieval quality (chunking, passage scoring) matters more than model size for trustworthy outputs.
- Good clarifying questions are a product feature, not an afterthought.
- Storing the reasoning summary + citations is as valuable as the decision itself.
What's next for TikTok Tech Compliance
More nodes: jurisdiction playbooks (e.g., age gating, data residency, payments), confidence scoring, and risk tiers. Corpus growth: curated, versioned regulatory snippets with change tracking; multilingual support. Deeper integrations: PR checks, Slack/Workflows, and dashboards with precision/recall + time-to-decision metrics. Governance: RBAC, red-teaming for false positives/negatives, and clearer “not legal advice” guardrails. UX polish: saved checklists, prefilled templates for common feature types, and better PDF ingestion.
Built With
- langgraph
- lightrag
- postgresql
- python
- streamlit