AI & LLM Engineering for .NET Architects

Hybrid Search: Combining Keyword and Semantic search for accuracy

1 Views Updated 5/4/2026

The Gold Standard: Hybrid Search

Pure vector search is great for "Meaning," but it's bad at "Exact Matches." If a user searches for a product ID like 'SKU-9901,' a vector search might return 'SKU-9902' because the meaning is similar. We solve this with Hybrid Search.

1. Vector + Keyword

Hybrid search runs two searches in parallel:

  • Vector Search: Finds things similar in meaning.
  • BM25 / Keyword Search: Finds exact word matches and product IDs.

2. Reciprocal Rank Fusion (RRF)

How do we combine the two lists? We use **RRF**. It merges the results and gives a higher score to items that appear at the top of BOTH lists. This provides the most accurate and "human-like" search experience possible.

4. Interview Mastery

Q: "What is a 'Semantic Reranker'?"

Architect Answer: "A reranker is an expensive but smart model that takes the top 50 results from a hybrid search and spends more compute power to re-order them perfectly. It looks at the actual *relevance* between the question and the snippet. In Azure AI Search, this is called **Semantic Ranking**. It significantly increases accuracy for complex questions, but adds ~200ms of latency to the search."

AI & LLM Engineering for .NET Architects
1. AI Foundations & Prompt Engineering
The LLM Landscape: Transformers, Attention, and Tokens Advanced Prompt Engineering: Few-shot, Chain-of-Thought, and ReAct Prompt Versioning & Management in Production LLM Cost Estimation: Token accounting and budget strategies
2. Semantic Kernel & Integration
Introduction to Microsoft Semantic Kernel (SK) Skills & Plugins: Extending the LLM with native C# functions Planner & Orchestration: Automating complex multi-step AI tasks Connectors: Switching between OpenAI, Azure OpenAI, and HuggingFace
3. Vector Databases & RAG
The RAG Pattern: Solving the 'Static Knowledge' problem Embeddings Deep Dive: Converting text to math Vector DBs: Azure AI Search vs Pinecode vs Milvus Hybrid Search: Combining Keyword and Semantic search for accuracy
4. Advanced RAG Techniques
Document Chunking Strategies: Overlap, Slidewindow, and Semantic splitting Recursive Document Processing for massive knowledge bases Context Window Management: Summarization vs Truncation Citations & Grounding: Ensuring the AI doesn't hallucinate
5. AI Safety & Guardrails
Content Moderation: Azure AI Content Safety integration Prompt Injection: Defending against adversarial attacks Punitiveness & Bias: Evaluating and mitigating model behavior Self-Correction Patterns: Letting the AI check its own work
6. Small Language Models (SLMs) & Local AI
The rise of SLMs: Phi-3, Llama-3-8B, and Mistral Running AI Locally with ONNX and LocalLLM Quantization: Running 70B models on 16GB RAM Edge AI: Deploying models to local devices and private clouds
7. Multimodal & Agentic AI
Multimodal AI: Processing Images, PDFs, and Audio in C# Agentic Workflows: Multi-agent collaboration with AutoGen Function Calling: Letting the LLM use your SQL and API tools Memory Management: Ephemeral vs Long-term Semantic memory
8. FAANG AI Engineer Interview
Case Study: Designing a Global Enterprise AI Knowledge Assistant Case Study: Building an Autonomous AI Agent for Software Dev