File size: 1,036 Bytes
0fa1096
8803786
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0fa1096
 
bc4be0a
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
{
  "title": "RAG with MMR + PDF Upload πŸ“„",
  "emoji": "πŸ“„",
  "colorFrom": "blue",
  "colorTo": "indigo",
  "sdk": "gradio",
  "sdk_version": "5.34.1",
  "app_file": "app.py",
  "pinned": false,
  "license": "apache-2.0",
  "tags": [
    "RAG",
    "MMR",
    "PDF",
    "upload",
    "retrieval-augmented-generation",
    "NLP",
    "search",
    "document-qa"
  ],
  "description": "A Gradio application demonstrating Retrieval Augmented Generation (RAG) with Maximal Marginal Relevance (MMR) for improved document retrieval, allowing users to upload PDF files for querying. This app aims to provide more relevant and diverse answers by leveraging MMR during the retrieval process."
}
---

# 🧠 Retrieval-Augmented Generation with MMR and PDF Upload

This Gradio demo allows you to:

- Upload a PDF document
- Chunk the content and embed using `MiniLM`
- Store and search chunks using FAISS with **Maximal Marginal Relevance (MMR)**
- Answer questions using `FLAN-T5`

> Powered by LangChain + HuggingFace + Gradio + FAISS