AI Research Intelligence & Document Platform
Empowering researchers, engineers, and academics with LLM-driven semantic search, automated literature reviews, and dynamic knowledge graph generation.
- π§ Multi-LLM Support: Seamlessly routes between Google Gemini, OpenAI GPT-4o, and local Ollama models with intelligent fallback mechanisms.
- π Literature Review Generator: Automatically synthesizes dense research documents into cohesive, professional literature reviews.
- π Semantic Vector Search: Powered by ChromaDB for blazing-fast, context-aware document retrieval using 3072-dimensional embeddings.
- πΈοΈ Knowledge Graph Visualization: Extracts entities and relationships into Neo4j, visualized in a stunning interactive graph UI.
- β‘ Document Intelligence: Asynchronous document ingestion via Celery & Redis, handling massive PDFs without blocking the main thread.
- π Secure Authentication: JWT-based role-based access control (RBAC).
| Dashboard & Upload | Chat & Semantic Search |
|---|---|
![]() |
![]() |
| Literature Review | Knowledge Graph |
![]() |
![]() |
(Note: Create an assets folder and add these images for them to display correctly).
graph TD
Client[Web Frontend - React/Vite] -->|REST API| API[FastAPI Backend]
API --> Auth[JWT Auth Middleware]
API --> Router[API Routers]
Router --> DB[(PostgreSQL)]
Router --> Queue[Redis Queue]
Queue --> Worker[Celery Worker]
Worker --> Extraction[Document Chunking]
Extraction --> Vector[(ChromaDB)]
Extraction --> Graph[(Neo4j)]
Worker --> LLM[LLM Routing Service]
LLM --> Gemini(Google Gemini)
LLM --> OpenAI(OpenAI API)
LLM --> Ollama(Local Ollama)
sequenceDiagram
participant User
participant FastAPI
participant Celery
participant LLM
participant ChromaDB
participant Neo4j
User->>FastAPI: Upload PDF
FastAPI->>Celery: Queue Document Processing
Celery->>Celery: Extract Text & Chunk
Celery->>LLM: Generate Embeddings (3072-dim)
LLM-->>Celery: Return Vectors
Celery->>ChromaDB: Store Vectors
Celery->>LLM: Extract Entities & Relationships
LLM-->>Celery: Return Graph Data
Celery->>Neo4j: Store Graph Nodes & Edges
Celery-->>User: Ingestion Complete
| Category | Technology | Description |
|---|---|---|
| Frontend | React 18, Vite, Tailwind CSS, Zustand | Modern, responsive, state-managed SPA. |
| Backend | Python 3.12, FastAPI, SQLAlchemy | High-performance async REST API. |
| Background Processing | Celery, Redis | Distributed task queue for ML pipelines. |
| Relational Database | PostgreSQL, asyncpg | ACID-compliant storage for users & metadata. |
| Vector Database | ChromaDB | High-performance semantic vector storage. |
| Graph Database | Neo4j | Native graph database for knowledge mapping. |
| AI/ML | Langchain, Gemini API, OpenAI, Ollama | LLM orchestration and embedding generation. |
- Docker & Docker Compose
- Node.js (v18+)
- Python (3.10+)
The easiest way to get started is using the bundled Docker Compose configuration.
# 1. Clone the repository
git clone https://github.com/yourusername/Knowledge_Sphere.git
cd Knowledge_Sphere
# 2. Copy the environment template
cp .env.example .env
# 3. Add your API keys to .env (Google Gemini / OpenAI)
# 4. Build and start the infrastructure
docker-compose up -d --buildThe API will be available at http://localhost:8000 and the frontend at http://localhost:5173.
# 1. Start the databases (Postgres, Redis, Neo4j, Chroma)
docker-compose up -d postgres redis neo4j chromadb
# 2. Setup Backend
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
alembic upgrade head
uvicorn app.main:app --reload
# 3. Setup Frontend
cd ../frontend
npm install
npm run dev
# 4. Start Celery Worker (In a new terminal)
cd backend
celery -A app.workers.celery_app worker --loglevel=infoCreate a .env file in the root directory. See .env.example for defaults.
| Variable | Description | Default |
|---|---|---|
DEFAULT_LLM_PROVIDER |
Primary AI provider (gemini, openai, ollama) |
gemini |
GOOGLE_API_KEY |
Your Google Gemini API Key | "" |
OPENAI_API_KEY |
Your OpenAI API Key | "" |
CHROMA_COLLECTION_DOCUMENTS |
Name of the ChromaDB index | documents_v5 |
POSTGRES_USER |
DB User | knowledge_user |
POSTGRES_PASSWORD |
DB Password | knowledge_pass |
NEO4J_URI |
Graph DB connection string | bolt://neo4j:7687 |
Once the backend is running, FastAPI automatically generates interactive documentation:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
Knowledge_Sphere/
βββ backend/
β βββ app/
β β βββ api/ # FastAPI Routers
β β βββ core/ # Config & Security
β β βββ models/ # SQLAlchemy Models
β β βββ services/ # LLM, Chroma, Neo4j integrations
β β βββ workers/ # Celery Background Tasks
β βββ alembic/ # Database Migrations
β βββ tests/ # E2E and Unit Tests
βββ frontend/
β βββ src/
β β βββ components/ # React UI Components
β β βββ services/ # Axios API Clients
β β βββ store/ # Zustand State Management
βββ docker-compose.yml # Infrastructure setup
βββ scripts/ # Utility scripts
| Metric | Target | Benchmark |
|---|---|---|
| API Latency | < 100ms | 45ms (avg) |
| Doc Processing | < 5s / MB | 3.2s / MB (Gemini 2.0 Flash) |
| Vector Search | < 50ms | 12ms (ChromaDB) |
| Graph Query | < 200ms | 85ms (Neo4j) |
(Note: Benchmarks taken on standard AWS t3.medium instances).
- Implement multi-modal document ingestion (Images/Charts to text).
- Add advanced RAG strategies (HyDE, Parent-Child chunking).
- Implement WebSockets for real-time extraction streaming.
- Add support for Anthropic Claude 3 models.
We welcome contributions! Please review our CONTRIBUTING.md for guidelines on how to submit PRs, report bugs, and suggest features. Be sure to adhere to our Code of Conduct.
This project is licensed under the MIT License - see the LICENSE file for details.
Pratik S Kanoj
Artificial Intelligence & Data Science Engineer
I am a passionate AI Engineer specializing in Machine Learning, Computer Vision, and full-stack integration. I build robust, production-ready AI systems that solve real-world problems. My expertise lies in taking complex Deep Learning architectures and deploying them into scalable, user-centric web applications.
Technical Expertise:
- AI & Data Science: Artificial Intelligence, Machine Learning, Deep Learning, Computer Vision, Generative AI, MLOps, Data Science.
- Backend & Cloud: Python, FastAPI, Docker, RESTful APIs.
- Frontend: React, JavaScript, HTML, CSS, Streamlit.
Connect with me:
- πΌ LinkedIn: Pratik S Kanoj
- π GitHub: github.com/PRATIKSK7
- βοΈ Email: pratiksk0077@gmail.com
If you found this project interesting or helpful, please consider giving it a β on GitHub!
Built with β€οΈ using Python, OpenAI, and Deep Learning.



