# PDF Question Answering App Welcome to the **PDF Question Answering App**! This application allows you to upload a PDF document and ask questions about its content. Powered by advanced AI models from Google Generative AI, this app aims to provide concise and accurate answers based on the uploaded document. ## How to Use the App 1. **Upload a PDF File:** - Click on the "Upload a PDF file" button. - Select a PDF file from your device. The app supports files with the `.pdf` extension. 2. **Extracting Text from the PDF:** - Once the PDF is uploaded, the app will automatically read and extract text from all pages of the document. 3. **Ask a Question:** - Enter your question in the provided text input field labeled "Enter your question about the PDF:". 4. **Get an Answer:** - Click the "Get Answer" button. - The AI will process your question and the extracted text to generate a concise and relevant answer. 5. **View the Response:** - The AI response will be displayed below the "AI Response:" section. ## Features - **Text Extraction:** Automatically extracts text from the uploaded PDF. - **Question Answering:** Utilizes Google Generative AI to answer questions based on the PDF content. - **Concise Responses:** Ensures answers are as concise as possible and ends responses with "thanks for asking!". - **Source Documents:** Provides source documents for the answers if needed. ## About Retrieval-Augmented Generation (RAG) This app is a **Retrieval-Augmented Generation (RAG)** application. RAG combines retrieval-based methods and generative models to provide accurate and contextually relevant answers. ### Key Points about RAG: - **Retrieval Component:** Fetches relevant documents or text chunks based on the input query. - **Generative Component:** Generates natural language responses using the retrieved information. - **Enhanced Accuracy:** Improves the precision of answers by grounding the generative model in actual data. - **Contextual Understanding:** Ensures that responses are contextually aligned with the provided document content. ## Built with LangChain This app is developed using **LangChain**, a framework designed for developing applications powered by large language models (LLMs). LangChain simplifies the integration of various components like text splitting, embedding models, vector stores, and prompt templates. ### Key Features of LangChain: - **Modular Design:** Facilitates easy integration of different components for building complex applications. - **Text Processing:** Efficiently handles text extraction and splitting into manageable chunks. - **Embeddings and Vector Stores:** Supports advanced embedding models and vector-based retrieval. - **Prompt Templates:** Allows customization of prompt templates for tailored AI responses. ## Created By This app was created by **Arjun Kumar Soni**. ## Contact For any questions or feedback, please reach out to Arjun Kumar Soni at [aksoni0520@gmail.com](mailto:aksoni0520@gmail.com).