This guide walks you from zero to a running PDF Insight Pro instance with a successful PDF upload and an LLM-powered answer — all in under five minutes. You will interact with the server through its REST API, but a built-in web UI is also available once the server is running.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.
Prerequisites
Before you begin, make sure you have the following:
- Python 3.12 or later — check with
python --version - A Groq API key — sign up at console.groq.com and generate a key from the dashboard
- A Tavily API key (optional) — required only if you want to enable live web-search augmentation; sign up at app.tavily.com
Clone & Install
Clone the repository, create an isolated virtual environment, and install all Python dependencies.The
requirements.txt includes FastAPI, LangChain, FAISS, PyMuPDF, Sentence Transformers, and all other runtime dependencies.Configure API Keys
Create a Never commit this file to source control — it is already listed in
.env file in the project root. The application loads it automatically on startup via python-dotenv..gitignore.Start the Server
Launch the FastAPI application with Uvicorn. The You should see output similar to:
--reload flag enables hot-reloading during development.Upload a PDF
Send a PDF file to the Response (Copy the
/upload-pdf endpoint. The server extracts, chunks, embeds, and indexes the document, then returns a session_id you will use for all subsequent chat requests.UploadResponse):session_id value — you will need it in the next step.Ask a Question
Post a question about your uploaded document to the Response (The
/chat endpoint. Include the session_id returned by the upload step.ChatResponse):context_used array lists every chunk the agent retrieved and its similarity score, giving you full transparency into what the LLM actually read.Enable Web Search
Set When
"use_search": true to instruct the LangChain agent to augment its answer with live Tavily web results. All other fields remain the same.use_search is true, the agent will call the Tavily Search API during its reasoning loop and incorporate web results alongside the document context before generating a final answer.