rag-patterns

Build RAG pipelines with Azure AI Search for hybrid retrieval.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/pascalvanderheiden/my-agent-skills --skill rag-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rag-patterns
Source: https://github.com/pascalvanderheiden/my-agent-skills/tree/main/skills/rag-patterns
Command: npx skills add https://github.com/pascalvanderheiden/my-agent-skills --skill rag-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires azure-search-documents, azure-identity, openai, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill enables building Retrieval-Augmented Generation (RAG) pipelines using Azure AI Search to ground LLM responses with knowledge bases and structured data.

Core Features & Use Cases

  • Agentic Retrieval: multi-query planning and synthesis across knowledge sources for complex, multi-step questions.
  • Full-Text + Vector Hybrid: combine BM25 keyword search with semantic vector similarities for robust answer grounding.
  • Semantic Ranking: leverage integrated semantic configurations to improve result relevance and citation quality.
  • Use Case: design an enterprise chatbot that can search product docs, manuals, and policy PDFs, then provide cited answers to user queries.

Quick Start

  • Install dependencies and run the example scripts to explore RAG patterns.
  • Create and configure indexes with vector and semantic capabilities: python scripts/create_index.py
  • Run vector-based search examples: python scripts/vector_search.py
  • Explore full-text search examples: python scripts/full_text_search.py
  • Experiment with agentic retrieval: python scripts/agentic_retrieval.py

Frequently Asked Questions about rag-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a RAG pipeline with Azure AI Search and OpenAI?

To build a RAG pipeline with Azure AI Search, you ground LLM responses using vector indexes and full-text search patterns. You need Azure OpenAI and azd deployment templates to configure indexes and implement scalable retrieval.

What is hybrid search and how does it improve retrieval-augmented generation?

Hybrid search combines BM25 keyword full-text search with semantic vector similarities to improve retrieval-augmented generation. This configuration grounds LLM responses more robustly by matching both exact keywords and semantic meaning across knowledge bases.

Can I use agentic retrieval for complex multi-step questions in enterprise chatbots?

Agentic retrieval supports complex multi-step questions through multi-query planning and synthesis across knowledge sources. It enables enterprise chatbots to search product docs, manuals, and policy PDFs, then provide cited answers to user queries.

Does semantic ranking work with vector search in Azure AI Search?

Semantic ranking works with vector search in Azure AI Search by leveraging integrated semantic configurations. This improves result relevance and citation quality when grounding LLMs with structured data and knowledge bases.

Do I need Azure OpenAI to implement scalable RAG pipelines?

You need Azure OpenAI to implement scalable RAG pipelines with this approach. It requires Azure OpenAI, vector indexing, and azd deployment templates to ground LLMs with Azure AI Search across knowledge bases and full-text patterns.

What's the best way to combine full-text search and vector search for enterprise data?

The best way to combine full-text and vector search for enterprise data is using a hybrid configuration in Azure AI Search. This pairs BM25 keyword search with semantic vector similarities to ground LLM responses with robust answer citations.