Project Story: The Greensboro Legal Navigator
Inspiration
Our project is inspired by the social engineering philosophy of Charles Hamilton Houston and the legacy of the Scottsboro Boys. In the early 20th century, the battle for justice was a battle for access to the legal process; today, that battle continues in Greensboro, where residents often face legal crises without a map. As students at North Carolina A&T, we built the Navigator to turn 57,407 chunks of complex North Carolina law into a tool for community empowerment.
How We Built It
We engineered a Multimodal Retrieval-Augmented Generation (RAG) pipeline designed for speed and scale:
Infrastructure: We utilized a decentralized architecture with AWS S3 hosting our persistent legal database.
Vector Search: We indexed the North Carolina General Statutes into LanceDB. Each statute chunk is converted into a high-dimensional vector to allow for semantic searching.
Retrieval Logic: To identify the most relevant laws for a user's specific crisis, the system calculates the similarity between the user query and the statute vectors. The system then retrieves the top results to provide grounded context for the AI synthesis.
Ingestion: Using OpenAI's Vision capabilities and pdf-parse, the Navigator reads both structured PDFs and raw photos of legal notices.
Challenges We Faced
Building a production-ready legal engine on a student budget presented unique engineering hurdles:
Memory Optimization: Loading a 57,000-chunk dataset into cloud instances with a 512MB RAM limit led to frequent Out-of-Memory crashes. We resolved this by implementing a Singleton Pattern to ensure only one database connection instance exists, effectively managing the memory footprint to keep the engine stable.
Express 5 Migration: During our transition to the newest Express version, we encountered significant routing errors due to breaking changes in the path-to-regexp library. We pivoted our routing strategy to use named wildcard parameters to restore cross-origin functionality across the API.
What We Learned
We learned the vital importance of Contextual Grounding. It is not enough for an AI to be generative; it must be strictly constrained by an objective knowledge base—the actual statutes of North Carolina. We also gained hands-on experience in Hybrid Cloud Architecture, learning how to bridge local compute power with cloud-hosted data to ensure maximum stability during high-stakes presentations.
Built With
- amazon-web-services
- lancedb
- langchain
- node.js
- openai
- tailwind
Log in or sign up for Devpost to join the conversation.