Skip to content

This repository serves as the RAG Project MiniLM Model from Microsoft named as sentence-transformers/all-MiniLM-L6-v2 as the embedding model for my resume , and utilizing OpenAI to answer questions based on the Resume

Notifications You must be signed in to change notification settings

fahmizainal17/Advanced_RAG_Project

Repository files navigation

🔍 Advanced RAG Project

wakatime


📄 Overview

The Advanced RAG Project (Retrieval-Augmented Generation) is an innovative application that leverages state-of-the-art technologies like FAISS and Gemini to offer a powerful Q&A interface based on Muhammad Fahmi's professional resume. This project integrates retrieval mechanisms with generative AI to provide concise and accurate answers based on a resume database. It’s a cutting-edge example of combining AI embeddings with user-friendly visualizations.


Table of Contents

  1. 🎯 Objectives
  2. 🔧 Technologies Used
  3. 📝 Directory Structure
  4. 🔍 Features
  5. 🔄 Project Workflow
  6. 🎉 Conclusion
  7. 📚 References
  8. 📜 License
  9. 🗺️ Code Workflow

🎯 Objectives

  • 🚀 Demonstrate advanced RAG workflows by integrating retrieval and generative AI models.
  • 🔍 Build an interactive resume Q&A interface for professional inquiries.
  • 🎓 Showcase the capabilities of FAISS and Gemini in a real-world application.

🔧 Technologies Used

Python Streamlit FAISS

Other libraries:

  • LangChain: For prompt handling.
  • HuggingFace Embeddings: For embedding generation.
  • PIL: For image handling.
  • Gemini API: For generative content creation.

📝 Directory Structure

.
├── LICENSE
├── README.md              # Project documentation
├── streamlit_app.py       # Main application file
├── streamlit_app_openai.py# Alternative OpenAI app
├── component.py           # Custom UI components and styles
├── requirements.txt       # Dependencies for the project
├── assets                 # Background images and sounds
│   ├── backgrounds        # UI-related assets
│   └── sounds             # Placeholder for future sound features
├── photos                 # Additional project photos
├── Database               # Resume data for embedding retrieval
│   └── Resume             # Resume images (pages 1 and 2)
└── Drawing.drawio         # Flowchart for app workflow

🔍 Features

1. Interactive Resume Q&A

  • Ask natural language questions about Muhammad Fahmi’s resume and get accurate, concise answers.

2. Resume Viewer

  • Visualize both pages of the resume in a clean, side-by-side interface.

3. FAISS Database Integration

  • Utilize efficient embedding-based retrieval for fast and relevant document search.

4. Gemini Generative Model

  • Generate detailed answers based on retrieved resume context using Gemini 1.5 Flash.

5. Dynamic User Experience

  • Responsive, visually appealing Streamlit interface.

🔄 Project Workflow

  1. 🌐 Environment Setup:

    • Install required libraries:

      pip install -r requirements.txt
    • Launch the app locally:

      streamlit run streamlit_app.py
  2. 🔧 Database Preparation:

    • Generate embeddings using HuggingFace Models.
    • Load embeddings into a FAISS index for fast retrieval.
  3. 🚀 Application Integration:

    • Set up Gemini API keys for generative responses.
    • Integrate retrieval and generation workflows into the Streamlit app.
  4. 🎮 User Interaction:

    • Users can ask questions, view resumes, and receive answers seamlessly.
  5. 🔄 Continuous Improvement:

    • Add new features, optimize embeddings, and improve app UX.

🗺️ Code Workflow

The following Mermaid diagram illustrates the workflow of the code:

graph TD
    A[Start] --> B[Load Custom Styles]
    B --> C[Configure Gemini API]
    C --> D[Initialize Embedding Model]
    D --> E[Define Prompt Template]
    E --> F[Display Resume Images]
    F --> G[User Inputs Question]
    G --> H[Load FAISS Database]
    H -->|Success| I[Retrieve Relevant Documents]
    H -->|Error| J[Display Error Message]
    I --> K[Generate Answer with Gemini]
    K --> L[Display Answer]
    J --> M[End]
    L --> M
Loading

🎉 Conclusion

The Advanced RAG Project is a practical demonstration of retrieval-augmented generation for real-world applications. With AI-powered Q&A based on personal resume data, this project bridges the gap between machine intelligence and user-centric design. It’s an ideal showcase for exploring advanced AI workflows and interactive app development.


📚 References


📜 License

Fahmi Zainal Custom License Unauthorized copying, distribution, or modification of this project is prohibited. For inquiries, contact the project owner.

About

This repository serves as the RAG Project MiniLM Model from Microsoft named as sentence-transformers/all-MiniLM-L6-v2 as the embedding model for my resume , and utilizing OpenAI to answer questions based on the Resume

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages