app/
??? controllers/
? ??? login.py
? ??? chat_RAG.py
? ??? agent.py
? ??? analytics.py
? ??? feedback.py
??? models/
? ??? user.py
? ??? chat.py
? ??? analytics.py
??? views/
??? responses/
app/modules/
??? auth/
? ??? controllers/
? ??? models/
? ??? views/
? ??? services/
??? chat/
? ??? controllers/
? ??? models/
? ??? views/
? ??? services/
??? [other modules...]
As AI systems become more complex, architectural changes become necessary:
The modular approach enables sophisticated agent coordination:
app/modules/agent/agents/
??? orchestrator/ # High-level coordination
??? search/ # Search capabilities
??? analysis/ # Future analysis agents
??? specialized/ # Domain-specific agents
| Data storage | Neo4j Integration | Advanced Querying |
|---|---|---|
| We use a graph database to store the data. | Neo4J is leveraged for both the graph database and the vector store. | Neo4J enables advanced queries, such as clustering the data and finding communities. |
| Vector store is utilized for storing embeddings. | These tasks are more efficient and easier to implement using a graph database. |
Making legal document images fully searchable
Consistent prompt design ensures standardized extraction across models
| Feature | MOLMO 7B | Amazon Nova Pro | Claude 3.5 Sonnet |
|---|---|---|---|
| Deployment | Self-hosted (OpenShift) | AWS Bedrock | AWS Bedrock |
| Parameters | 7 Billion | Proprietary | Proprietary (175B+) |
| Processing Time | 15-20 sec/image (~ 24 hours) |
2-3 sec/image (~ 3-3.5 hours) |
2-4 sec/image (~ 3-3.5 hours) |
| Input Cost | Free (self-hosted) | $0.0008/1K tokens | $0.003/1K tokens |
| Output Cost | Free (self-hosted) | $0.0032/1K tokens | $0.015/1K tokens |
| Total Cost (4459 images) |
Free | ~$20 | ~$60 |
| Aspect | MOLMO 7B | Amazon Nova Pro | Claude 3.5 Sonnet |
|---|---|---|---|
| Content Accuracy | Moderate | Good | Excellent |
| Prompt Following | Inconsistent | Variable | Highly consistent |
| Output Structure | Often deviates | Sometimes deviates | Follows structure precisely |
| Legal Domain | Basic understanding | Good understanding | Strong contextual grasp |
| Overall Quality | Acceptable | Good | Superior |
{
"Acts": {
"Election Act": {
"96106_greatseal.gif": "1. Image Type and Category...",
// More images...
},
// More acts...
},
"Regulations": {
"Wildfire_Regulation___38_2005": {
"38_2005.gif": "1. Image Type and Category...",
// More images...
}
}
}
High Performance Computing for pre-processing the data
To improve the AI model we need to annotate and format the data properly. After the data is annotated we can use it to train the different models.
If the top sources are not accurate we can retrain the embedding model based on human feedback.
For improving our retrieval and enhancing our result we are using an AI technique called NER (Named Entity Recognition) to annotate the data.
This can be done manually with tools such as Diffgram or Doccano or can be automated using an AI model to pre-annotate.
Using artificial intelligence, specifically large language models, to conduct autonomous, in-depth, multi-step research.
Questions?
All of our presentation and diagrams can be found in our github repository.