Customer support teams at Microsoft handle thousands of questions daily across Teams, Azure, Copilot, Surface, Windows, Office 365, and GitHub. Manually answering repetitive questions is expensive and slow. This project builds an AI-powered support assistant using Retrieval Augmented Generation (RAG) that automatically answers customer questions by retrieving relevant documentation and generating accurate, grounded responses using GPT-4o.
RAG (Retrieval Augmented Generation) is the architecture that powers Microsoft Copilot. It works in three steps:
Customer Question → Retrieve Relevant Docs → GPT-4o Generates Answer
Unlike a standard LLM, a RAG system only answers based on retrieved context, preventing hallucinations and ensuring factually grounded responses.
Knowledge Base (10 docs)
↓
TF-IDF Vectorizer (similarity search)
↓
Retrieved Documents (top 3 most relevant)
↓
GPT-4o (Azure OpenAI) generates grounded answer
↓
Response with sources and relevance scores
| Product | Documents |
|---|---|
| Microsoft Teams | 2 |
| Microsoft Copilot | 2 |
| Azure | 2 |
| Surface | 1 |
| Windows | 1 |
| Office 365 | 1 |
| GitHub | 1 |
- Grounded responses: Answers based only on retrieved documents, never invented
- Source citations: Every answer cites which documents were used and their relevance scores
- Hallucination prevention: Out of scope questions are handled honestly without making up answers
- Multi-turn conversations: Maintains context across follow up questions in the same session
- Relevance scoring: Shows confidence scores for retrieved documents
Question: My Teams keeps crashing during important meetings
Answer: If Microsoft Teams keeps crashing during your meetings, follow these steps:
- Update Teams via Help > Check for updates
- Clear the Teams cache at %appdata%/Microsoft/Teams
- Check internet connection, Teams requires 1.5 Mbps for HD video
- Disable GPU hardware acceleration in Settings > General
- Reinstall Teams if the issue persists
Sources used:
- Microsoft Teams: Teams crashes during meetings (relevance: 40.80%)
| Question | In Knowledge Base | Response |
|---|---|---|
| Teams crashing fix | Yes | Accurate grounded answer |
| Azure bill too high | Yes | Accurate grounded answer |
| Price of Teams | No | Correctly declined to answer |
| Python + Azure SQL | No | Correctly declined to answer |
| Windows 12 requirements | No | Correctly declined to answer |
- Python 3.9
- Azure OpenAI (GPT-4o)
- scikit-learn (TF-IDF retrieval)
- python-dotenv (secure credential management)
- openai Python SDK
rag-support-assistant/
├── notebooks/
│ └── 01_rag_support_assistant.ipynb # Full RAG pipeline
├── src/
│ └── (helper scripts)
├── .env # API credentials (not pushed)
├── .gitignore
├── README.md
└── requirements.txt
# Clone the repo
git clone https://github.com/philipatosam/rag-support-assistant.git
cd rag-support-assistant
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Create .env file with your Azure OpenAI credentials
echo "AZURE_OPENAI_KEY=your-key-here" > .env
echo "AZURE_OPENAI_ENDPOINT=your-endpoint-here" >> .env
echo "AZURE_OPENAI_DEPLOYMENT=gpt-4o" >> .env
# Launch Jupyter
jupyter notebook- Create an Azure account at https://azure.microsoft.com/free
- Create an Azure OpenAI resource in the Azure Portal
- Deploy a GPT-4o model in Azure AI Foundry
- Copy your endpoint and API key to the .env file
- Replace TF-IDF retrieval with Azure AI Search for semantic search
- Expand knowledge base with real Microsoft documentation
- Add conversation memory using Azure Cosmos DB
- Build a web interface using Streamlit or FastAPI
- Implement response evaluation using GPT-4o as a judge
- Add support ticket auto-classification and routing