An AI-powered chatbot built using Retrieval-Augmented Generation (RAG) that delivers accurate, context-aware answers for educational and assessment-related queries.
The system combines semantic search, embeddings, and Large Language Models (LLMs) to retrieve relevant information from a custom knowledge base and generate intelligent responses in real time.
http://18.224.111.129:5000/chat
Note: The demo may be temporarily unavailable if the AWS EC2 instance is stopped to remain within AWS Free Tier limits.
- Semantic search using vector embeddings
- Context-aware AI responses using Gemini 2.5 Flash
- Retrieval-Augmented Generation (RAG) pipeline
- Knowledge base stored in AWS S3
- REST API built with Flask
- Interactive Streamlit chat interface
- Cloud deployment using AWS EC2 and Elastic IP
- Real-time retrieval from custom educational dataset
User Query
↓
Streamlit UI
↓
Flask API
↓
Sentence Embeddings
↓
Cosine Similarity Retrieval
↓
Gemini 2.5 Flash
↓
Generated Response
- Flask - Web framework for API
- Python - Programming language
- Streamlit - Interactive chat interface
- Gemini 2.5 Flash API - Language model for response generation
- sentence-transformers - Embedding model library
- all-MiniLM-L6-v2 - Pre-trained embedding model
- AWS EC2 - Virtual machine for hosting
- AWS S3 - Dataset storage
- IAM Roles - Access management
- Elastic IP - Stable public address
- Transformers
- NumPy
- boto3
- scikit-learn
curl -X POST "http://18.224.111.129:5000/chat" \
-H "Content-Type: application/json" \
-d '{"query":"What is machine learning?"}'{
"answer": "Machine learning is a subset of artificial intelligence that enables systems to learn from data.",
"query": "What is machine learning?",
"top_results": [
"Machine learning is a subset of artificial intelligence that enables systems to learn from data.",
"Supervised learning uses labeled data to train models."
]
}git clone https://github.com/theHoodguy4587/AI-Assessment-Assistant.git
cd AI-Assessment-AssistantWindows:
python -m venv rag-env
rag-env\Scripts\activateLinux / Mac:
python3 -m venv rag-env
source rag-env/bin/activatepip install -r requirements.txtpython app.pyThe backend will run on: http://localhost:5000
streamlit run ui.py --server.address 0.0.0.0 --server.port 8501The UI will run on: http://localhost:8501
This project is deployed using AWS cloud services:
- EC2 Instance - Hosting backend and frontend
- S3 Bucket - Dataset storage
- IAM Role - Secure S3 access
- Elastic IP - Stable public access
- User submits a question through the Streamlit UI
- The Flask API receives the query
- The query is converted into embeddings
- Cosine similarity retrieves the most relevant documents
- Retrieved context is sent to Gemini 2.5 Flash
- The generated response is returned to the user
- Small educational dataset
- CPU-based inference on EC2
- No vector database integration yet
- Limited conversational memory
- Add FAISS or Pinecone vector database
- Improve prompt engineering
- Add chat history memory
- Dockerize the application
- Add authentication system
- Deploy with Nginx and Gunicorn
- Add conversation analytics dashboard
- Expand dataset with more educational topics
Senitha Gunathilaka
Aspiring Data Scientist | AI & RAG Enthusiast
- GitHub: https://github.com/theHoodguy4587
- LinkedIn: https://www.linkedin.com/in/senitha-gunathilaka-404236285/
If you found this project useful, consider giving the repository a star ⭐

