Spaces:
Running
Running
| title: RAG Pedagogical Demo | |
| emoji: π | |
| colorFrom: blue | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: 4.44.0 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| # π RAG Pedagogical Demo | |
| An interactive educational application to learn about Retrieval Augmented Generation (RAG) systems. | |
| ## What is RAG? | |
| Retrieval Augmented Generation (RAG) combines information retrieval with language generation to create more accurate and grounded AI responses. Instead of relying solely on a language model's training data, RAG systems: | |
| 1. **Retrieve** relevant information from a document corpus | |
| 2. **Augment** the query with this retrieved context | |
| 3. **Generate** an answer based on both the query and the retrieved information | |
| ## Features | |
| - π **Upload your own PDFs** or use the default corpus | |
| - π§ **Configure retrieval parameters**: embedding models, chunk size, top-k, similarity threshold | |
| - π€ **Configure generation parameters**: LLM selection, temperature, max tokens | |
| - π **Visualize the process**: see retrieved chunks, similarity scores, and prompts | |
| - π **Bilingual interface**: English and French | |
| ## How to Use | |
| 1. **Corpus Tab**: Upload a PDF or use the default corpus about RAG | |
| 2. **Retrieval Tab**: Choose embedding model and retrieval parameters | |
| 3. **Generation Tab**: Select language model and generation settings | |
| 4. **Query Tab**: Ask questions and see how RAG works! | |
| ## Educational Value | |
| This demo helps you understand: | |
| - How documents are processed and chunked | |
| - How semantic search retrieves relevant information | |
| - How context is provided to language models | |
| - How different parameters affect the results | |
| Perfect for students, educators, and anyone curious about modern AI systems! | |
| ## Technology | |
| - **Framework**: Gradio | |
| - **Embeddings**: Sentence Transformers | |
| - **Vector Store**: FAISS | |
| - **LLMs**: HuggingFace Inference API | |
| - **Infrastructure**: HuggingFace ZeroGPU | |
| --- | |
| *Note: This application runs on ZeroGPU. Initial requests may take longer as models are loaded.* | |