!!!Making one for the law Enforcement & Government
(Following Works in progress)
- Deployment
- Modules in python
This solution implements a sophisticated graph system for analyzing and processing law enforcement transcripts using Large Language Models (LLMs), Retrieval-Augmented Generation (RAG), and Neo4j Knowledge Graphs. The system is designed to help law enforcement agencies better understand and analyze criminal networks and organizations.
The system processes law enforcement transcripts through several key stages:
- Transcript loading and processing
- Summary generation using LLMs
- Knowledge graph construction in Neo4j
- RAG-based query answering system
graph TD
A[Loading & Pre-processing Transcripts] --> B[Transcript Summary Generation]
B --> C[Knowledge Graph Creation using LLM]
C --> D[Graph RAG]
D --> E[Intelligence Output]
.
├── app.py # Main application entry point
├── config.py # Configuration settings
├── generate_summary.py # Transcript summary generation
├── graph_rag.py # RAG implementation with Neo4j
├── knowledge_graph.py # Neo4j knowledge graph operations
├── load_transcript.py # Transcript loading and processing
├── llm.py # LLM-related functionality
├── requirements.txt # Project dependencies
└── call_transcripts/ # Directory containing law enforcement transcripts
The project uses several key technologies and libraries:
- Python 3.x
- Neo4j Desktop
- LangChain
- OpenAI API
- Gemini API
- Various Python packages (see requirements.txt)
-
Clone the repository
-
Create a virtual Python environment (Avoids interference with global packages):
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up your environment variables in
config.py
-
Ensure Neo4j database is running and accessible
To run the knowledge graph locally using Neo4j with Bolt protocol, follow these steps:
-
Install Neo4j Desktop from https://neo4j.com/download
-
Create a new project and start a database
-
Set the Bolt connection credentials:
- URL: bolt://localhost:7687
- Username: neo4j
- Password: your-password (update in config.py)
-
-
Run the main application:
python app.py
-
Enter your query when prompted
Update the following in config.py:
- Neo4j connection details
- API keys for LLM services
- Other configuration parameters
Contributions are welcome! Please feel free to submit a Pull Request.
- Call transcripts generated from LLM - Google Studio
- Open source community for various tools and libraries
- Research papers and resources referenced in References.txt