AI & LLM Engineering for .NET Architects

Document Chunking Strategies: Overlap, Slidewindow, and Semantic splitting

1 Views Updated 5/4/2026

Advanced Document Chunking

You can't send a 1,000-page PDF to an LLM all at once. You must break it into smaller pieces called Chunks. Choosing the wrong chunking strategy can destroy the AI's ability to find the right answer.

1. Fixed-Size Chunking

Splitting every 500 tokens. **Pros:** Simple, fast. **Cons:** It might cut a sentence or a paragraph in half, losing context. We solve this with **Overlap** (e.g., each chunk contains 10% of the previous chunk), ensuring no information is lost at the boundaries.

2. Recursive Character Splitting

The "Industry Standard." It tries to split at the largest possible boundary (Double newline), then single newline, then space. This keeps paragraphs and sentences together as single units of meaning.

3. Semantic Chunking (Next Gen)

Using an AI model to detect when the **Topic** changes. Instead of splitting based on character count, it splits when the meaning shifts. This creates the highest quality RAG context but is more expensive to generate.

4. Interview Mastery

Q: "How do you handle 'Tables' in PDFs for RAG?"

Architect Answer: "Tables are a nightmare for standard chunkers. We use **Layout-Aware Parsing** (like Azure AI Document Intelligence). It converts tables into Markdown format. Markdown preserves the row/column relationship in text form, which LLMs are excellent at reading. Simply stripping the text from a table destroys the meaning."

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