How parth1609/ragveda works
Project type and purpose
• This is a full-stack Retrieval-Augmented Generation (RAG) application for intelligent document ingestion, knowledge-graph creation, and natural-language question answering.
• It uses Streamlit as a lightweight frontend, Neo4j as a graph database backend, and Groq LLM for response generation.
File structure
• Top-level files:
• main.py (or app.py) – entry point for the Streamlit UI
• requirements.txt, .env.example – environment and dependency configuration
• notebooks (RAGVeda.ipynb, graphrag.ipynb) – exploratory/Colab demos
• modules/ directory:
• config.py – loads environment variables and settings
• document_processor.py – PDF ingestion, chunking, entity extraction
• neo4j_manager.py – Neo4j connection, schema setup, CRUD APIs for graph
• retrieval.py – graph-based search logic
• llm_chain.py – prompt construction, Groq API calls, LLM orchestration
• ui_components.py – Streamlit UI widgets and layouts
• dataset/ and output/ – sample input CSV and generated graph visuals
README for additional insights
• Features: knowledge graph integration, natural-language QA, custom prompts
• Tech stack: Streamlit (UI), Neo4j (DB), Groq LLM
• Document processing flow and query processing flow are spelled out
• Core components named: GraphRAG, Neo4jGraph, GraphQAChain
a. Main Components
1. Streamlit Frontend (modules/ui_components.py + main.py)
2. Configuration Loader (modules/config.py)
3. Document Processing Pipeline (modules/document_processor.py)
4. Graph Database Manager (modules/neo4j_manager.py + Neo4j instance)
5. Retrieval Engine (modules/retrieval.py)
6. LLM Chain (modules/llm_chain.py + external Groq API)
7. Data Stores: Neo4j Graph DB, local dataset directory
b. Relationships and Interactions
• Ingestion flow: User → UI → Document Processor → Neo4j Manager → Neo4j
• Query flow: User Query → UI → LLM Chain → Retrieval Engine → Neo4j → Context → LLM Chain → UI
• Configuration feeds into all modules at startup
c. Architectural Patterns and Principles
• Pipeline pattern for ingestion and query processing
• Single-page-style interactive UI with separated business logic
• Clear separation of concerns: UI, config, processing, data access, LLM orchestration
d. Relevant Technologies
• Python
• Streamlit
• Neo4j (Bolt protocol)
• Groq LLM API
• Environment variables (.env)