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.
- 🎯 Objectives
- 🔧 Technologies Used
- 📝 Directory Structure
- 🔍 Features
- 🔄 Project Workflow
- 🎉 Conclusion
- 📚 References
- 📜 License
- 🗺️ Code Workflow
- 🚀 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.
Other libraries:
- LangChain: For prompt handling.
- HuggingFace Embeddings: For embedding generation.
- PIL: For image handling.
- Gemini API: For generative content creation.
.
├── 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
- Ask natural language questions about Muhammad Fahmi’s resume and get accurate, concise answers.
- Visualize both pages of the resume in a clean, side-by-side interface.
- Utilize efficient embedding-based retrieval for fast and relevant document search.
- Generate detailed answers based on retrieved resume context using Gemini 1.5 Flash.
- Responsive, visually appealing Streamlit interface.
-
🌐 Environment Setup:
-
Install required libraries:
pip install -r requirements.txt
-
Launch the app locally:
streamlit run streamlit_app.py
-
-
🔧 Database Preparation:
- Generate embeddings using HuggingFace Models.
- Load embeddings into a FAISS index for fast retrieval.
-
🚀 Application Integration:
- Set up Gemini API keys for generative responses.
- Integrate retrieval and generation workflows into the Streamlit app.
-
🎮 User Interaction:
- Users can ask questions, view resumes, and receive answers seamlessly.
-
🔄 Continuous Improvement:
- Add new features, optimize embeddings, and improve app UX.
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
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.
Fahmi Zainal Custom License Unauthorized copying, distribution, or modification of this project is prohibited. For inquiries, contact the project owner.