How devtamin04/lawgic--l-gpt6.7--vaic2026 works
LAWGIC turns legal documents and public discussion into a shared legal knowledge graph, then exposes cited legal answers, time-aware search, graph exploration, and misinformation trends through an API and dashboard. The legal-data stages are parsing, entity extraction, graph loading, and amendment diffing; the discourse stages classify posts, link claims to provisions, assess misunderstandings, and surface trends. The graph connection/schema form the internal persistence layer. The README documents capabilities beyond the sampled excerpts; those are represented at subsystem level where exact runtime wiring is not evidenced.
Main entry points: connection.py Graph connection · app.js Dashboard UI · main.py API application · qa_endpoint.py Cited Q&A and search
Components 24
Legal ingestion
- Legal parser
backend/ingestion/parser.py - Entity extraction
backend/ingestion/extractor.py
Legal knowledge graph
- Graph loader
backend/graph/loader.py - Amendment diffing
backend/graph/diffing.py - Graph schema
backend/graph/schema.py - Graph connection
backend/graph/connection.py
Discourse intelligence
- Topic classifier
backend/discourse/classifier.py - Claim-law linker
backend/discourse/linker.py - Query normalization
backend/discourse/query_norm.py - Semantic retrieval
backend/discourse/embeddings.py - Misinfo and trends
backend/discourse/misinformation.py - Discourse pipeline
scripts/run_pipeline.py
API and dashboard
- API application
backend/api/main.py - Cited Q&A and search
backend/api/qa_endpoint.py - Dashboard API
backend/api/dashboard_endpoint.py - Documents API
backend/api/documents_endpoint.py - Graph API
backend/api/graph_endpoint.py - Law API
backend/api/law_endpoint.py - Dashboard UI
frontend/static/app.js
Other components
- Legal documents
- Public posts
- Neo4j
- LLM client
backend/core/llm.py - User
Connections 35
- Legal documents → Legal parser: parsed into
- Legal documents → Entity extraction: entities extracted
- Legal parser → Graph loader: structured documents
- Entity extraction → Graph loader: enriched data
- Graph loader → Graph connection: writes through
- Graph schema → Graph connection: defines graph
- Graph connection → Neo4j: reads and writes
- Amendment diffing → Graph connection: reads and updates
- Public posts → Discourse pipeline: provides posts
- Discourse pipeline → Topic classifier: classifies posts
- Discourse pipeline → Claim-law linker: links claims
- Discourse pipeline → Misinfo and trends: assesses and clusters
- Topic classifier → LLM client: classifies with
- Claim-law linker → Query normalization: normalizes retrieval
- Claim-law linker → Semantic retrieval: retrieves candidates
- Claim-law linker → LLM client: ranks with
- Misinfo and trends → LLM client: assesses with
- API application → Cited Q&A and search: dispatches
- API application → Dashboard API: dispatches
- API application → Documents API: dispatches
- API application → Graph API: dispatches
- API application → Law API: dispatches
- Cited Q&A and search → Query normalization: normalizes question
- Cited Q&A and search → Graph connection: retrieves legal basis
- Cited Q&A and search → LLM client: generates answer
- Dashboard API → Graph connection: reads dashboard data
- Documents API → Graph connection: reads documents
- Graph API → Graph connection: reads graph data
- Law API → Graph connection: queries law
- Dashboard UI → Cited Q&A and search: requests answers and search
- Dashboard UI → Dashboard API: loads dashboard
- Dashboard UI → Documents API: requests documents
- Dashboard UI → Graph API: explores graph
- Dashboard UI → Law API: requests legal data
- User → Dashboard UI: uses dashboard