PDF Insight Pro is a production-ready document intelligence API that combines Retrieval Augmented Generation (RAG) with LangChain tool-calling agents. Upload any PDF, then query it in natural language — the system retrieves semantically relevant chunks, invokes a Groq-powered LLM, and optionally validates answers against live web results via Tavily.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Jatin-Mehra119/PDF-Insight-Beta/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Run PDF Insight Pro locally and make your first API call in minutes.
Configuration
Set API keys, tune chunk sizes, select models, and configure FAISS parameters.
Architecture Overview
Understand the layered architecture — API routes, services, utilities, and storage.
API Reference
Full reference for all REST endpoints: upload, chat, sessions, and models.
How It Works
PDF Insight Pro processes your documents through a four-stage pipeline:Upload a PDF
POST /upload-pdf — the server extracts text with PyMuPDF, splits it into semantic chunks, generates embeddings with BAAI/bge-large-en-v1.5, and indexes them in a FAISS HNSW index. A session ID is returned.Ask a question
POST /chat — send your session ID and a natural-language query. The agent retrieves the top matching chunks and passes them as context to the Groq LLM.Agent reasoning
A LangChain tool-calling agent decides whether the initial context is sufficient or whether it needs to perform additional vector searches or Tavily web lookups.
Key Features
Agentic RAG
LangChain
create_tool_calling_agent drives multi-step retrieval — the agent can call vector_database_search and tavily_search_results_json autonomously.FAISS HNSW Index
Fast approximate nearest-neighbour search with configurable
efConstruction and efSearch parameters for precision/speed trade-offs.Multiple LLMs via Groq
Switch between Llama 4 Scout 17B, Llama 3.1 8B Instant, Llama 3.3 70B Versatile, and GPT-OSS 120B at upload time.
Web Search Augmentation
Toggle
use_search: true in any chat request to let the agent verify document content against live Tavily web results.Session Persistence
Sessions survive restarts — data is serialised to disk and reconstructed on demand, keeping the FAISS index and chat history intact.
Docker & HF Spaces
First-class Docker support and a GitHub Actions workflow for zero-config deployment to Hugging Face Spaces.
RAG System Performance
The RAG pipeline has been evaluated on theneural-bridge/rag-dataset-12000 benchmark:
| Metric | Value |
|---|---|
| Semantic Similarity (mean) | 0.852 |
| ROUGE-L F1 (mean) | 0.395 |
| Evaluation pass rate | 85.3% (64 / 75) |