InsightPad is a NotebookLM-style platform built with Azure's latest(as of Jan 2026) RAG advancements for structured PDF intelligence. It lets users organize documents in notebooks, ask grounded questions, and navigate answers with citations.
merlinNB/
├── frontend/ # React + Vite client
└── backend/ # FastAPI + Azure services
- Separated frontend and backend apps: independent release cadence and deployment scaling.
- Notebook-centric data model: documents, sessions, and messages are scoped to notebooks for focused retrieval.
- User isolation by default: backend filters and storage paths are user-scoped to avoid cross-tenant leakage.
- Async document pipeline: upload, convert, chunk, embed, and index happen in background-friendly stages.
- Hybrid retrieval first: blend vector, keyword, and semantic ranking before generation.
- Retrieval: hybrid search over indexed chunks.
- Generation: single-pass LLM answer from retrieved context.
- Best for: direct questions and faster latency.
- Tradeoff: less robust on multi-hop or ambiguous questions.
InsightPad's agentic mode uses Azure AI Search's Knowledge Base for multi-step retrieval orchestration. A lightweight model handles query planning and knowledge source selection, then the main model synthesizes final answers with page citations.
- Retrieval orchestration: planner-style, multi-step query and synthesis flow.
- Generation: iterative reasoning across intermediate retrieval steps.
- Best for: complex, multi-part, or exploratory questions.
- Tradeoff: higher latency and compute cost.
Azure AI Search's retrievalReasoningEffort parameter controls how much LLM processing is applied during query planning and answer formulation. InsightPad exposes this via the AGENTIC_REASONING_EFFORT environment variable.
- Minimal, low, Medium
Set the reasoning effort in your backend .env file:
# Options: minimal, low, medium
AGENTIC_REASONING_EFFORT=lowThe setting is applied when the Knowledge Base is created. To change it after creation, you may need to recreate the Knowledge Base or override per-request.
- Frontend: React, TypeScript, Vite, TanStack Query, Tailwind CSS
- Backend: FastAPI, Pydantic, JWT auth, Azure Cosmos DB, Azure Blob Storage, Azure AI Search, Azure OpenAI
- Python 3.11+ with Pipenv
- Node.js 18+ with npm
- Azure account with required services provisioned
- Environment variables configured (see
.env.examplefiles)
cd backend
# Install dependencies
pipenv install
# Copy and configure environment variables
cp .env.example .env
# Edit .env with your Azure credentials
# Run development server
pipenv run devThe backend runs at http://localhost:8000 by default.
cd frontend
# Install dependencies
npm install
# Configure API endpoint (optional, defaults to localhost:8000)
echo "VITE_API_URL=http://localhost:8000" > .env
# Run development server
npm run devThe frontend runs at http://localhost:5173 by default.
cd backend
# Build image
docker build -t insightpad-backend .
# Run locally
docker run -it -p 8000:8000 --env-file .env insightpad-backend
# Push to Azure Container Registry
docker tag insightpad-backend <your-registry>.azurecr.io/insightpad-backend:latest
docker push <your-registry>.azurecr.io/insightpad-backend:latestcd frontend
# Build image (with API URL baked in)
docker build --build-arg VITE_API_URL=https://your-backend-url.com -t insightpad-frontend .
# Run locally (with backend on host machine)
docker run -p 3000:80 \
-e BACKEND_URL=http://host.docker.internal:8000 \
-e BACKEND_HOST=host.docker.internal:8000 \
insightpad-frontend
# Push to Azure Container Registry
docker tag insightpad-frontend <your-registry>.azurecr.io/insightpad-frontend:latest
docker push <your-registry>.azurecr.io/insightpad-frontend:latestKey variables to configure:
| Variable | Description |
|---|---|
AZURE_OPENAI_ENDPOINT |
Azure OpenAI service endpoint |
AZURE_OPENAI_API_KEY |
Azure OpenAI API key |
COSMOS_ENDPOINT |
Azure Cosmos DB endpoint |
COSMOS_KEY |
Azure Cosmos DB key |
AZURE_BLOB_CONNECTION_STRING |
Azure Blob Storage connection string |
AZURE_SEARCH_ENDPOINT |
Azure AI Search endpoint |
AZURE_SEARCH_ADMIN_KEY |
Azure AI Search admin key |
JWT_SECRET_KEY |
Secret for JWT token signing |
AGENTIC_REASONING_EFFORT |
Reasoning effort level: minimal, low, or medium |
See backend/.env.example for the complete list.
| Variable | Description |
|---|---|
VITE_API_URL |
Backend API base URL |
To avoid breaking existing client deployments, some infrastructure defaults and cloud resource identifiers may still include legacy names in environment variables/configuration.