This document explains the Azure AI Search indexing setup for the music-taster-agent project, covering the index schema, vector search profiles, skillsets, and PDF ingestion flow.
The index ks-azureblob-index is configured for knowledge source ks-azureblob.
1 index is defined in this file: ks-azureblob-index
The index contains 6 fields:
| Field | Type | Description | Searchable | Filterable | Sortable |
|---|---|---|---|---|---|
uid |
String | Primary key; uses keyword analyzer for exact matching | Yes | No | Yes |
snippet_parent_id |
String | Groups related snippets from same page; filter-only | No | Yes | No |
blob_url |
String | Source blob URL for reference; filter-only | No | Yes | No |
snippet |
String | Full text content (page or image description); full-text searchable | Yes | No | No |
image_snippet_parent_id |
String | Groups snippets from images; filter-only | No | Yes | No |
snippet_vector |
Collection(Single) | Vector embeddings (3072 dimensions) for semantic search | Yes | No | No |
A vector search profile is a combination of 3 properties:
- Algorithm –
ks-azureblob-vector-search-algorithm - Vectorizer –
ks-azureblob-vectorizer - Compression –
ks-azureblob-vector-search-scalar-quantization
HNSW stands for Hierarchical Navigable Small World.
- Purpose: Graph-based Approximate Nearest Neighbor (ANN) algorithm for efficient vector similarity search.
- How it works: Builds multi-layer small-world graphs where nearest neighbors can be reached with few hops.
- Distance metric: Uses cosine similarity (configured in this setup).
- Tunable parameters:
m: 4– Graph connectivity (edges per node); lower = smaller index, faster insertion; higher = better recall.efConstruction: 400– Accuracy/speed tradeoff during index build.efSearch: 500– Recall/latency tradeoff during queries.
- Use case: Excellent balance of recall and latency for high-dimensional embeddings like the 3072-dimensional vectors in this index.
- Service:
text-embedding-3-large - Endpoint:
https://foundry-ge54qtofw3zem.openai.azure.com - Deployment:
text-embedding-3-large - Output dimensions: 3072
- Type: int8 scalar quantization
- Purpose: Reduces storage and memory footprint while maintaining recall.
- Rescoring: Enabled with 4x oversampling to preserve accuracy.
- Default: BM25 Similarity (for traditional full-text search on
snippetfield)
- Semantic search enabled on
snippetfield - Ranking order: BoostedRerankerScore
- Uses semantic reranking to improve relevance beyond keyword/vector search
The skillset ks-azureblob-skillset handles document enrichment before indexing.
- Purpose: Split PDF document content into manageable chunks
- Split mode: Pages (character-based)
- Max chunk size: 2,000 characters
- Overlap: 200 characters (for context continuity)
- Input: Document text content
- Output:
pagesarray with chunked text
- Purpose: Generate vector embeddings for each text chunk
- Model:
text-embedding-3-large - Dimensions: 3,072
- Context: Applied to each page (
/document/pages/*) - Output:
text_vectorfor each page
- Purpose: Generate concise text descriptions of images, figures, diagrams, charts
- Model: GPT-4.1 (Chat Completion)
- Context: Applied to each extracted image (
/document/normalized_images/*) - System prompt: "You are tasked with generating concise, accurate descriptions of images, figures, diagrams, or charts in documents."
- Output:
verbalizedImagetext description
- Purpose: Vectorize image descriptions
- Model:
text-embedding-3-large - Dimensions: 3,072
- Context: Applied to verbalized images
- Output:
verbalizedImage_vector
1. PDF Blob Ingestion
├─ Extract text content
└─ Extract and normalize images
2. Text Processing
├─ SplitSkill: Chunk text into pages (2k chars, 200 overlap)
└─ AzureOpenAIEmbeddingSkill: Generate text_vector (3072d)
3. Image Processing
├─ GenAISkill: Describe images → verbalizedImage
└─ VerbalizedImageAzureOpenAIEmbeddingSkill: Generate verbalizedImage_vector (3072d)
4. Index Projection
├─ Pages selector: Maps page data to index fields
│ ├─ snippet ← page text
│ ├─ snippet_vector ← text_vector
│ ├─ blob_url ← source URL
│ └─ snippet_parent_id ← parent document ID
│
└─ Images selector: Maps image data to index fields
├─ snippet ← verbalizedImage description
├─ snippet_vector ← verbalizedImage_vector
├─ blob_url ← source URL
└─ image_snippet_parent_id ← parent document ID
5. Index Storage (skipIndexingParentDocuments mode)
└─ Only child snippets indexed, parent document excluded
- Source context:
/document/pages/* - Target index:
ks-azureblob-index - Parent key field:
snippet_parent_id - Mappings:
snippet_vector←/document/pages/*/text_vectorsnippet←/document/pages/*(page text)blob_url←/document/blob_url
- Source context:
/document/normalized_images/* - Target index:
ks-azureblob-index - Parent key field:
image_snippet_parent_id - Mappings:
snippet_vector←/document/normalized_images/*/verbalizedImage_vectorsnippet←/document/normalized_images/*/verbalizedImage(description)blob_url←/document/blob_url
- Mode:
skipIndexingParentDocuments - Effect: Only child snippets (pages and images) are indexed; parent document record is not created
PDF Blob Input
│
├─── Text Extraction
│ ├─ SplitSkill (2k char chunks, 200 overlap)
│ │ └─ Output: /document/pages/*
│ │
│ └─ AzureOpenAIEmbeddingSkill
│ └─ Output: /document/pages/*/text_vector (3072d)
│
└─── Image Extraction
├─ GenAISkill (describe image)
│ └─ Output: /document/normalized_images/*/verbalizedImage
│
└─ VerbalizedImageAzureOpenAIEmbeddingSkill
└─ Output: /document/normalized_images/*/verbalizedImage_vector (3072d)
Index Projections (skipIndexingParentDocuments)
│
├─── Pages Selector
│ └─ Index Fields:
│ ├─ snippet (page text)
│ ├─ snippet_vector (text_vector)
│ ├─ blob_url
│ └─ snippet_parent_id (grouping key)
│
└─── Images Selector
└─ Index Fields:
├─ snippet (verbalizedImage description)
├─ snippet_vector (verbalizedImage_vector)
├─ blob_url
└─ image_snippet_parent_id (grouping key)
Search Index: ks-azureblob-index
│
├─ Full-text search: snippet field (BM25 similarity)
├─ Vector search: snippet_vector field (HNSW + Azure OpenAI vectorizer + int8 compression)
├─ Semantic search: snippet field with reranking
└─ Filtering/grouping: blob_url, snippet_parent_id, image_snippet_parent_id
- Field:
snippet - Algorithm: BM25 Similarity
- Use case: Keyword matching on text and verbalized image descriptions
- Field:
snippet_vector - Algorithm: HNSW (cosine similarity)
- Vectorizer: Azure OpenAI
text-embedding-3-large - Compression: int8 scalar quantization with rescoring
- Use case: Semantic similarity search across pages and image descriptions
- Field:
snippet - Config: BoostedRerankerScore
- Use case: Improve relevance of BM25 or vector results using semantic understanding
- By source:
blob_url(retrieve results from specific PDFs) - By parent document:
snippet_parent_id(pages from same document),image_snippet_parent_id(images from same document)
| Component | Value |
|---|---|
| Index Name | ks-azureblob-index |
| Number of Indexes | 1 |
| Number of Fields | 6 |
| Vector Dimensions | 3,072 |
| Vector Algorithm | HNSW (cosine similarity) |
| Vectorizer | Azure OpenAI text-embedding-3-large |
| Compression | int8 scalar quantization |
| Similarity Scoring | BM25 + Semantic Reranking |
| Skillset Name | ks-azureblob-skillset |
| Key Skills | SplitSkill, Text Embedding, Image Verbalization, Image Embedding |
| Projection Mode | Skip parent documents (index only snippets) |
| Supported Content | Text (pages) + Images (verbalized) |
- Index configuration:
api/music_taster_agent/config/index.json - Skillset configuration:
api/music_taster_agent/config/skillset.json