ms-agent-framework-rag
Create RAG systems with C# using the Microsoft Agent Framework.
Install
mkdir -p .claude/skills/ms-agent-framework-rag && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7812" && unzip -o skill.zip -d .claude/skills/ms-agent-framework-rag && rm skill.zipInstalls to .claude/skills/ms-agent-framework-rag
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Comprehensive guide for building Agentic RAG systems using Microsoft Agent Framework in C#. Use when creating RAG applications with semantic search, document indexing, and intelligent agent orchestration. Includes scaffolding scripts, reference implementations, and documentation for vector databases, embedding models, and multi-agent workflows.Key capabilities
- →Scaffold Agentic RAG systems
- →Implement vector database indexing
- →Batch document ingestion
How it works
It provides scaffolding scripts and orchestration logic to build RAG systems using Microsoft Agent Framework in C#.
Inputs & outputs
When to use ms-agent-framework-rag
- →Build RAG knowledge bases
- →Orchestrate multi-agent workflows
- →Implement vector database indexing
About this skill
Microsoft Agent Framework - Agentic RAG System
This skill provides scaffolding and guidance for building production-ready Agentic RAG (Retrieval-Augmented Generation) systems using Microsoft Agent Framework with C#.
Quick Start
Use the scaffolding script to create a new RAG system:
scripts/create_rag_system.sh <project-name> [--output-dir <path>]
Example:
scripts/create_rag_system.sh MyKnowledgeBase --output-dir ./my-rag-project
Architecture Overview
An Agentic RAG system consists of:
- Ingestion Layer: Document parsing, chunking, and embedding generation
- Vector Store: Semantic search index (Azure AI Search, Qdrant, or Pinecone)
- Agent Framework: Multi-agent orchestration with Microsoft AutoGen
- LLM Integration: Azure OpenAI or OpenAI API for generation
- API Layer: RESTful endpoints for querying
Core Components
1. Semantic Search
- Use Azure AI Search for integrated vector + keyword search
- Store embeddings with metadata (source, timestamp, tags)
- Implement hybrid search (vector + BM25) for best results
See references/semantic_search.md for implementation details.
2. Multi-Agent System
Build specialized agents:
- Research Agent: Finds relevant documents
- Synthesis Agent: Combines information from multiple sources
- Validation Agent: Checks accuracy and citations
See references/agent_patterns.md for agent design patterns.
3. Document Processing
- Supported formats: PDF, DOCX, TXT, MD, HTML
- Chunking strategies: semantic, sliding window, hierarchical
- Metadata extraction: title, author, date, tags
See references/document_processing.md for chunking strategies.
Available Scripts
create_rag_system.sh
Scaffolds a complete RAG system with:
- Project structure following best practices
- Configuration files (appsettings.json)
- Docker compose for local development
- Example agents and tools
Usage:
scripts/create_rag_system.sh <project-name> [--output-dir <path>]
ingest_documents.sh
Batch document ingestion:
scripts/ingest_documents.sh <source-dir> <index-name>
run_local.sh
Start the RAG system locally:
scripts/run_local.sh <project-dir>
Configuration
Required environment variables:
AZURE_OPENAI_ENDPOINT=<your-endpoint>
AZURE_OPENAI_API_KEY=<your-key>
AZURE_SEARCH_ENDPOINT=<your-search-endpoint>
AZURE_SEARCH_KEY=<your-search-key>
EMBEDDING_MODEL=text-embedding-ada-002
CHAT_MODEL=gpt-4
Reference Documentation
references/semantic_search.md- Vector search implementationreferences/agent_patterns.md- Multi-agent design patternsreferences/document_processing.md- Chunking and preprocessingreferences/evaluation.md- RAG quality metrics
Best Practices
- Start Simple: Begin with basic RAG, add agents incrementally
- Metadata Matters: Rich metadata improves retrieval accuracy
- Hybrid Search: Combine vector and keyword search
- Citation Tracking: Always include source references
- Evaluation: Use RAGAS framework for quality metrics
Common Patterns
Multi-Step Retrieval
For complex queries, use iterative refinement:
- Initial search with broad query
- Research agent expands with sub-queries
- Synthesis agent combines results
- Validation agent checks citations
Citation Management
Always track:
- Document ID
- Page number
- Chunk index
- Relevance score
See references/citations.md for implementation.
Troubleshooting
Poor Retrieval Quality
- Adjust chunk size (try 512-1024 tokens)
- Use hybrid search instead of pure vector
- Add more metadata for filtering
- Consider re-embedding with different model
Slow Performance
- Enable caching on vector queries
- Use streaming responses
- Implement async document ingestion
- Consider partitioning large indices
High Costs
- Use smaller models for embeddings
- Cache frequently asked questions
- Implement result pagination
- Use batch processing for ingestion
When not to use it
- →Simple keyword-based search
- →Non-C# environments
Prerequisites
Limitations
- →Requires specific environment variables
- →Performance depends on vector store
How it compares
It provides a structured framework for multi-agent RAG rather than building from scratch.
Compared to similar skills
ms-agent-framework-rag side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| ms-agent-framework-rag (this skill) | 1 | 7mo | Review | Advanced |
| azure-ai-projects-dotnet | 0 | 3mo | Review | Advanced |
| azure-ai-openai-dotnet | 1 | 3mo | Review | Intermediate |
| azure-ai-document-intelligence-dotnet | 0 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by shuyu-labs
View all by shuyu-labs →You might also like
azure-ai-projects-dotnet
microsoft
Azure AI Projects SDK for .NET. High-level client for Azure AI Foundry projects including agents, connections, datasets, deployments, evaluations, and indexes. Use for AI Foundry project management, versioned agents, and orchestration. Triggers: "AI Projects", "AIProjectClient", "Foundry project", "versioned agents", "evaluations", "datasets", "connections", "deployments .NET".
azure-ai-openai-dotnet
microsoft
Azure OpenAI SDK for .NET. Client library for Azure OpenAI and OpenAI services. Use for chat completions, embeddings, image generation, audio transcription, and assistants. Triggers: "Azure OpenAI", "AzureOpenAIClient", "ChatClient", "chat completions .NET", "GPT-4", "embeddings", "DALL-E", "Whisper", "OpenAI .NET".
azure-ai-document-intelligence-dotnet
microsoft
Azure AI Document Intelligence SDK for .NET. Extract text, tables, and structured data from documents using prebuilt and custom models. Use for invoice processing, receipt extraction, ID document analysis, and custom document models. Triggers: "Document Intelligence", "DocumentIntelligenceClient", "form recognizer", "invoice extraction", "receipt OCR", "document analysis .NET".
azure-mgmt-arizeaiobservabilityeval-dotnet
microsoft
Azure Resource Manager SDK for Arize AI Observability and Evaluation (.NET). Use when managing Arize AI organizations on Azure via Azure Marketplace, creating/updating/deleting Arize resources, or integrating Arize ML observability into .NET applications. Triggers: "Arize AI", "ML observability", "ArizeAIObservabilityEval", "Arize organization".
langchain
zechenzhangAGI
Framework for building LLM-powered applications with agents, chains, and RAG. Supports multiple providers (OpenAI, Anthropic, Google), 500+ integrations, ReAct agents, tool calling, memory management, and vector store retrieval. Use for building chatbots, question-answering systems, autonomous agents, or RAG applications. Best for rapid prototyping and production deployments.
reasoningbank-with-agentdb
ruvnet
Implement ReasoningBank adaptive learning with AgentDB's 150x faster vector database. Includes trajectory tracking, verdict judgment, memory distillation, and pattern recognition. Use when building self-learning agents, optimizing decision-making, or implementing experience replay systems.