GenAI + MCP learning track turned into a working RAG-and-tools assistant
Discovered from README cross-links · 2 days ago
Learner built a tool-using GenAI assistant by pairing the 21-lesson course
What they did
They started from the microsoft/generative-ai-for-beginners curriculum, working through the early lessons on generative AI and LLMs, prompt engineering, and building applications with a model provider, then moved into retrieval-augmented generation and responsible AI lessons. Rather than stopping at notebooks, they used the course's application-building lessons to stand up a small chat app with a system prompt, a retrieval step over their own documents, and a function-calling loop. To give the assistant real capabilities instead of hardcoded functions, they then followed mcp-for-beginners to learn the Model Context Protocol, wrote two small MCP servers (one exposing a local file/knowledge search, one exposing a simple utility like a calculator or weather stub), and wired the client so the model could discover and call those tools. They kept the course's responsible-AI guidance in mind, adding a short system-prompt policy and logging tool calls so they could see what the model invoked. Finally they wrote a README with setup steps, environment variables for the model endpoint, and a few example prompts that exercise both retrieval and tool calls.
How it went
They ended with a working local demo: a chat UI that answers from their documents and calls MCP tools when asked, plus notes mapping each feature back to the specific lessons. Polish is prototype-level — it runs locally, the tool servers are small, and there is no deployment or evaluation harness yet. The main win was understanding how retrieval, function calling, and MCP fit together in one loop rather than as separate tutorials.
Worth knowing
The course is provider-agnostic but examples lean on Azure/OpenAI-style endpoints, so keys and model names need adjusting. MCP client/server wiring and transport choices (stdio vs HTTP) are the most common failure point, and the README excerpt does not cover them. No cost controls, rate limiting, or eval suite were added; retrieval quality depends entirely on chunking choices the learner made by hand.
Wiring
Order: read the intro/LLM/prompt-engineering lessons, then the RAG and application-building lessons, then the MCP for Beginners lessons on servers and clients. Config: a .env with MODEL_ENDPOINT, MODEL_NAME, API_KEY, and DOCS_PATH; MCP servers launched as subprocesses over stdio with their command and args declared in a client config file. Flow: user message -> embed -> vector search over docs -> build prompt with retrieved chunks -> model call with tool schemas -> if tool_calls returned, dispatch to the matching MCP server via the client session, append results, re-call model -> stream final answer. Keep tool schemas generated from the MCP server's advertised tools rather than hand-written, and log each hop.
Try it yourself
I'm working through microsoft/generative-ai-for-beginners and microsoft/mcp-for-beginners. In this repo, scaffold a small Python chat app that: (1) loads markdown files from ./docs, chunks and embeds them, and retrieves top-k context per question; (2) calls a chat model via an OpenAI-compatible endpoint configured by env vars; (3) supports a tool-calling loop; (4) connects to two local MCP servers over stdio — one exposing search_docs(query) and one exposing a simple utility tool; (5) logs every tool call with args and result. Add a README with setup, env vars, and three example prompts that exercise retrieval and tools. Keep it minimal and readable, and cite which lesson each piece maps to.