A comprehensive educational repository exploring Large Language Models (LLMs), Retrieval-Augmented Generation (RAG), AI Agents, and Model Context Protocol (MCP) through practical, hands-on examples.
This repository contains practical demonstrations and implementations of modern AI technologies:
- Azure OpenAI Integration: Complete setup guide for Azure OpenAI services
- Chat Conversations: Build an AI study buddy for computer science topics
- Image Generation: Create visual aids using DALL-E
- Educational Applications: Real-world examples for students
- Essay Writing Assistant: Help with academic writing and outlines
- Document Processing: Extract text from PDF files (Constitution of Kenya 2010)
- Text Chunking: Intelligent document segmentation
- Vector Embeddings: Using Sentence Transformers for semantic search
- FAISS Integration: Efficient similarity search
- Query System: Ask questions about constitutional content
A complete Model Context Protocol (MCP) server for Spotify integration:
- Music Control: Play, pause, skip tracks, and adjust volume
- Apple Script Integration: Native macOS Spotify control
- MCP Tools: Structured tool definitions for AI agents
- Debug Support: Built-in debugging with MCP Inspector
- Agent Builder Integration: Connect with AI Toolkit Agent Builder
- Python 3.8+
- Azure OpenAI subscription (for LLM demos) or GitHub Models
- Spotify application (for MCP server)
- macOS (for Spotify MCP server)
-
Clone the repository:
git clone https://github.com/BethanyJep/llms-and-a-bit-more.git cd llms-and-a-bit-more -
For LLM Notebooks:
- Create a
.envfile with your Azure OpenAI credentials:AZURE_OPENAI_ENDPOINT=your_azure_endpoint_here AZURE_OPENAI_API_KEY=your_azure_api_key_here
- Install dependencies:
pip install openai python-dotenv requests pillow
- Create a
-
For RAG Implementation:
pip install pymupdf sentence-transformers faiss-cpu openai tiktoken
-
For Spotify MCP Server:
cd spotify-play-music # Using uv (recommended) uv venv && uv pip install -r pyproject.toml --extra dev # Or using pip python -m venv .venv && pip install -e .[dev]
System ptompt: Control Spotify playback effectively using specific tools for playing, pausing, skipping tracks, setting volume, and retrieving currently playing track information.
# Create a conversation with AI
study_conversation = [
{"role": "system", "content": "You are a helpful computer science tutor."},
{"role": "user", "content": "Explain data structures simply."}
]
response = chat_with_ai(study_conversation)# Query the Constitution of Kenya
question = "What are the fundamental rights in Kenya?"
relevant_chunks = query_constitution(question, k=3)play_music(query): Play specific songs, artists, or albumspause_music(): Pause current playbacknext_track()/previous_track(): Navigate tracksget_current_track(): Get currently playing track infoset_volume(level): Adjust volume (0-100)
- GenAI for Beginners - Microsoft's comprehensive guide to Generative AI
- AI Agents for Beginners - Learn about AI agents and autonomous systems
- MCP for Beginners - Model Context Protocol fundamentals
- GitHub for Students - Free tools and resources for students
- GitHub Models - Explore AI models on GitHub
- Azure for Students - Free Azure credits for students
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.