How sairohit022001/rag-powered-event-bot works
Project Type and Purpose
• This is a full-stack, single-page Streamlit application (“RAG Powered Event Bot”) that presents an interactive dashboard for a workshop: agenda display, participant matching, session recommendations, venue info, lunch countdown, conversational feedback, and a generative AI assistant.
• It combines UI (Streamlit) + business-logic modules + a Retrieval-Augmented Generation (RAG) pipeline (Faiss vector store + OpenAI LLM).
File Structure
• All files live at the project root—no nested services—indicating a monolithic architecture.
• app.py
• Orchestrates the Streamlit UI and routes to feature modules.
• agenda.py, matching.py, recommendations.py, directions.py, lunch_timer.py, feedback.py
• Each implements one feature.
• rag_agent.py
• Encapsulates the RAG workflow: vector store queries + LLM calls.
• requirements.txt / runtime.txt
• Lists dependencies (streamlit, pdfplumber, faiss-cpu, openai, langchain, pyngrok).
Extract Insights from the README
• “Retrieval-Augmented Generation” implies: user inputs → embedding lookup in Faiss → prompt construction → OpenAI LLM → response.
• Features map one-to-one to Python modules.
• Uses PDF parsing (pdfplumber) for any static documents.
Main Components & Their Interactions
a. UI Layer (Streamlit App)
• Component: app.py + Streamlit UI widgets
b. Feature Modules (Business Logic)
• Subcomponents (Green rectangles):
• Agenda Service (agenda.py)
• Matching Service (matching.py)
• Recommendation Service (recommendations.py)
• Directions Service (directions.py)
• Timer Service (lunch_timer.py)
• Feedback Service (feedback.py)
• Assistant Service (assistant logic via rag_agent.py)
c. RAG Agent
• Central orchestrator (Yellow rectangle):
• Connects to Faiss vector store for similarity search
• Calls OpenAI API (Embeddings + ChatCompletion)
• Uses LangChain abstractions
d. Data Layer
• Event agenda data (could be JSON/CSV/PDF)
• Session metadata (keywords)
• Uploaded resumes (for matching)
• Vector Store (Faiss index)
e. External Services (Gray clouds):
• OpenAI API
• Optional: ngrok (pyngrok) for local tunneling
Relationships & Data Flows
1. User → Streamlit UI (app.py)
2. UI → Selected Feature Module
• e.g., click “Match Participants” → matching.py
3. Feature Module → rag_agent (if it needs retrieval or generation) OR direct data source
• matching.py calls rag_agent to embed resumes + query Faiss
• recommendations.py may do keyword match in-memory or via simple lookups
• feedback.py & assistant use rag_agent → OpenAI
4. rag_agent → Faiss Vector Store → returns top-k documents or embeddings
5. rag_agent → OpenAI ChatCompletion → returns conversational response
6. Module → UI → displays results
Important Architectural Patterns / Principles
• Separation of Concerns: UI vs. Business Logic vs. Data Access.
• Modular feature services for each dashboard capability.
• RAG pipeline decoupled as its own component.
• Single monolith but logically layered.