@@ -452,46 +452,46 @@ This approach eliminates the need for manual embedding generation and ensures co
452452
453453#### Vector Storage Architecture
454454
455- Here's how the automatic vector generation works:
455+ Here's how the automatic vector generation works when storing chunks :
456456
457457``` mermaid
458458%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#f4f4f4', 'primaryTextColor': '#000', 'primaryBorderColor': '#333', 'lineColor': '#333', 'secondaryColor': '#e1f5fe', 'tertiaryColor': '#f3e5f5' }}}%%
459- graph LR
460- subgraph IC["IngestedChunk Object"]
461- KEY[Key: Guid]
462- DOC[DocumentId: string]
463- PAGE[PageNumber: int]
464- TEXT[Text: string]
465- VEC["Vector property<br/>returns Text"]
466- end
459+ flowchart TB
460+ Chunk["IngestedChunk Object<br/>---<br/>Key: Guid<br/>DocumentId: string<br/>PageNumber: int<br/>Text: 'Product features...'<br/><br/>[VectorStoreVector]<br/>Vector property → returns Text"]
467461
468- subgraph VDB["Vector Collection"]
469- UPSERT[UpsertAsync]
470- EMB[Embedding<br/>Generator]
471- STORE[(Storage)]
472- end
462+ Chunk -->|Call UpsertAsync| VectorCollection[Vector Collection Framework]
473463
474- subgraph Stored["Stored Data"]
475- META[Metadata:<br/>Key, DocumentId,<br/>PageNumber, Text]
476- VECT["Vector:<br/>float array<br/>1536 dimensions"]
477- end
464+ VectorCollection -->|1. Detect [VectorStoreVector] attribute| Detect{Attribute<br/>Found?}
465+
466+ Detect -->|Yes| Extract[2. Get value from Vector property<br/>Result: 'Product features...']
467+
468+ Extract --> Generate[3. Call Azure OpenAI<br/>Embedding Generator<br/>text-embedding-3-small model]
469+
470+ Generate --> Embed[4. Generate 1536-dimensional<br/>vector embedding]
478471
479- IC -->|chunk object| UPSERT
480- VEC -.->|provides text| EMB
481- UPSERT -->|detect VectorStoreVector| EMB
482- EMB -->|text-embedding-3-small| VECT
483- UPSERT -->|all properties| META
484- META --> STORE
485- VECT --> STORE
472+ Embed --> Store[5. Store in Qdrant]
473+
474+ Store --> Result["Stored Record<br/>---<br/>Metadata: Key, DocumentId, Text<br/>Vector: float array 1536 dims<br/>Distance: Cosine Similarity"]
475+
476+ style Chunk fill:#e1f5fe
477+ style VectorCollection fill:#fff4e6
478+ style Detect fill:#fff4e6
479+ style Extract fill:#f9d5e5
480+ style Generate fill:#d5e8d4
481+ style Embed fill:#d5e8d4
482+ style Store fill:#e1f5fe
483+ style Result fill:#e8f5e8
486484```
487485
488- The ` [VectorStoreVector] ` attribute marks the ` Vector ` property, which returns the ` Text ` . The vector collection framework automatically:
486+ ** Key Concept** : The ` [VectorStoreVector] ` attribute on the ` Vector ` property enables automatic embedding generation:
487+
488+ 1 . ** Attribute Detection** : Framework detects properties marked with ` [VectorStoreVector] `
489+ 2 . ** Text Extraction** : Gets the text value from the Vector property
490+ 3 . ** Embedding Generation** : Sends text to Azure OpenAI's text-embedding-3-small model
491+ 4 . ** Vector Creation** : Converts text into a 1536-dimensional vector
492+ 5 . ** Storage** : Stores both the original text metadata and the generated vector using cosine similarity for distance calculations
489493
490- - Detects properties marked with ` [VectorStoreVector] `
491- - Gets the value from that property (the text string)
492- - Calls the configured embedding generator (text-embedding-3-small)
493- - Converts the text into a 1536-dimensional vector
494- - Stores both the original text and the generated vector using cosine similarity for distance calculation
494+ This automatic process eliminates manual embedding generation and ensures consistency.
495495
496496### Semantic Search Flow
497497
0 commit comments