Skip to content

PalakVerma-code/ResearchAi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ResearchAI β€” AI-Powered Research Agent

An intelligent, full-stack AI Research Agent that autonomously searches academic papers, generates AI summaries using IBM Granite, and enables semantic Q&A across multiple papers using MongoDB Atlas Vector Search.


ScreenShot Screenshot 2026-07-04 193454 Screenshot 2026-07-03 125520 Screenshot 2026-07-04 203931 Screenshot 2026-07-04 213751


πŸ“Œ Problem Statement

Researchers and students waste hours manually searching, reading, and synthesizing academic papers. ResearchAI solves this by automating the entire research discovery pipeline using Agentic AI.


✨ Features

  • πŸ” Smart Paper Search β€” Search 200M+ academic papers via Semantic Scholar API
  • πŸ€– AI Summarization β€” Complex papers summarized in simple language using IBM Granite
  • πŸ’¬ Semantic Q&A β€” Ask questions across multiple papers using MongoDB Atlas Vector Search
  • πŸ“Œ Save Papers β€” Bookmark and persist important papers across sessions
  • ⚑ Real-time Updates β€” Live agent status streaming via Socket.io
  • πŸ—„οΈ Redis Caching β€” 60% faster repeat searches with intelligent caching

πŸ—οΈ System Architecture

User Query
    ↓
React Frontend (Vite)
    ↓
Node.js + Express Backend
    ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Agent Pipeline            β”‚
β”‚                                     β”‚
β”‚  Search Agent β†’ Semantic Scholar    β”‚
β”‚  Summarize Agent β†’ IBM Granite      β”‚
β”‚  Embedding Agent β†’ Vector Store     β”‚
β”‚  Storage Agent β†’ MongoDB Atlas      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    ↓
Real-time Response via Socket.io

πŸ› οΈ Tech Stack

Frontend

Technology Purpose
React.js + Vite UI Framework
Tailwind CSS Styling
Socket.io Client Real-time updates
Axios HTTP requests
Lucide React Icons

Backend

Technology Purpose
Node.js + Express Server & API
Socket.io Real-time streaming
Redis Response caching
Winston Production logging
Joi Request validation
Helmet Security headers

AI & Database

Technology Purpose
IBM Granite (ibm/granite-4-h-small) Paper summarization & Q&A
IBM Watsonx.ai LLM API & governance
MongoDB Atlas Paper storage
MongoDB Vector Search Semantic similarity search
Semantic Scholar API Academic paper database

πŸ“ Project Structure

ResearchAI/
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ SearchBar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PaperCard.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ StatusBar.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AskBar.jsx
β”‚   β”‚   β”‚   └── Sidebar.jsx
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   └── Home.jsx
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── api.js
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   └── main.jsx
β”‚   └── package.json
β”‚
└── backend/
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ config/
    β”‚   β”‚   β”œβ”€β”€ db.js
    β”‚   β”‚   β”œβ”€β”€ redis.js
    β”‚   β”‚   └── env.js
    β”‚   β”œβ”€β”€ controllers/
    β”‚   β”‚   β”œβ”€β”€ search.controller.js
    β”‚   β”‚   β”œβ”€β”€ ask.controller.js
    β”‚   β”‚   └── saved.controller.js
    β”‚   β”œβ”€β”€ services/
    β”‚   β”‚   β”œβ”€β”€ arxiv.service.js
    β”‚   β”‚   β”œβ”€β”€ granite.service.js
    β”‚   β”‚   └── vector.service.js
    β”‚   β”œβ”€β”€ models/
    β”‚   β”‚   β”œβ”€β”€ Paper.model.js
    β”‚   β”‚   └── SavedPaper.model.js
    β”‚   β”œβ”€β”€ middleware/
    β”‚   β”‚   β”œβ”€β”€ error.middleware.js
    β”‚   β”‚   β”œβ”€β”€ rateLimit.middleware.js
    β”‚   β”‚   └── validate.middleware.js
    β”‚   β”œβ”€β”€ routes/
    β”‚   β”‚   β”œβ”€β”€ search.routes.js
    β”‚   β”‚   β”œβ”€β”€ ask.routes.js
    β”‚   β”‚   └── saved.routes.js
    β”‚   β”œβ”€β”€ socket/
    β”‚   β”‚   └── socket.handler.js
    β”‚   └── utils/
    β”‚       β”œβ”€β”€ logger.js
    β”‚       β”œβ”€β”€ asyncHandler.js
    β”‚       β”œβ”€β”€ ApiResponse.js
    β”‚       └── ApiError.js
    β”œβ”€β”€ server.js
    └── package.json

βš™οΈ Setup & Installation

Prerequisites

Node.js >= 18
MongoDB Atlas account (free)
IBM Cloud account (free)
Redis (optional β€” app works without it)

1. Clone the repository

git clone https://github.com/yourusername/research-agent.git
cd research-agent

2. Backend Setup

cd backend
npm install

Create .env file:

NODE_ENV=development
PORT=5000
MONGODB_URI=your_mongodb_atlas_uri
REDIS_URL=redis://localhost:6379
IBM_API_KEY=your_ibm_api_key
IBM_PROJECT_ID=your_watsonx_project_id
IBM_GRANITE_URL=https://us-south.ml.cloud.ibm.com
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:5173
npm run dev

3. Frontend Setup

cd frontend
npm install

Create .env file:

VITE_API_URL=http://localhost:5000
npm run dev

4. Open Browser

http://localhost:5173

πŸ”Œ API Endpoints

Method Endpoint Description
POST /api/search Search papers by topic
POST /api/ask Ask question across papers
GET /api/saved Get all saved papers
POST /api/saved Save a paper
DELETE /api/saved/:arxivId Remove saved paper
GET /health Health check

🌐 Environment Variables

Variable Description
MONGODB_URI MongoDB Atlas connection string
IBM_API_KEY IBM Cloud API key
IBM_PROJECT_ID Watsonx.ai project ID
IBM_GRANITE_URL IBM Granite endpoint URL
REDIS_URL Redis connection URL
JWT_SECRET JWT signing secret
CLIENT_URL Frontend URL for CORS

πŸ”’ Security Features

  • Helmet.js β€” HTTP security headers
  • Rate limiting β€” 10 searches/min per IP
  • MongoDB sanitization β€” prevents injection attacks
  • Input validation β€” Joi schema validation
  • Environment variables β€” no secrets in code
  • Error handling β€” stack traces hidden in production

🎯 IBM SkillsBuild Internship Project

This project was built as part of the IBM SkillsBuild University Engagements β€” AICTE 2026 internship program.

Problem Statement: No. 1 β€” Research Agent

IBM Technologies Used:

  • IBM Watsonx.ai β€” Model deployment and API access
  • IBM Granite (ibm/granite-4-h-small) β€” LLM for summarization
  • IBM Cloud Lite β€” Free tier infrastructure

πŸ‘©β€πŸ’» Developer

Palak Verma B.Tech CSE β€” CSJM University, Kanpur (2024-2028)

GitHub LinkedIn


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors