Skip to content

Commit 07db601

Browse files
Addressed comments and changed from Bhive to Hyperscale
1 parent 2c5f798 commit 07db601

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

tutorial/markdown/aspnet/semantic-kernel/semantic-kernel-tutorial.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ path: "/tutorial-csharp-semantic-kernel-vector-search"
55
title: Build Vector Search with Couchbase .NET Semantic Kernel Connector and OpenAI
66
short_title: Vector Search with Semantic Kernel
77
description:
8-
- Build a semantic search application using Couchbase BHIVE vector index with Semantic Kernel.
8+
- Build a semantic search application using Couchbase Hyperscale vector index with Semantic Kernel.
99
- Learn to use the Couchbase .NET Vector Store Connector for Microsoft Semantic Kernel.
1010
- Discover how to generate embeddings with OpenAI and store them in Couchbase.
1111
- Perform vector similarity searches with filtering using SQL++ and ANN_DISTANCE.
@@ -26,14 +26,14 @@ length: 30 Mins
2626
## Repository Links
2727

2828
- **Connector Repository**: [couchbase-semantic-kernel](https://github.com/Couchbase-Ecosystem/couchbase-semantic-kernel) - The official Couchbase .NET Vector Store Connector for Microsoft Semantic Kernel
29-
- **This Example**: [CouchbaseVectorSearchDemo](https://github.com/Couchbase-Ecosystem/couchbase-semantic-kernel/tree/Support-Bhive-and-Composite-Index/CouchbaseVectorSearchDemo) - Complete working example demonstrating vector search with Couchbase
29+
- **This Example**: [CouchbaseVectorSearchDemo](https://github.com/couchbase-examples/couchbase-semantic-kernel-quickstart/tree/main/CouchbaseVectorSearchDemo) - Complete working example demonstrating vector search with Couchbase
3030

3131
## Introduction
3232

3333
This demo showcases the **Semantic Kernel Couchbase connector** - a .NET library that bridges Microsoft's Semantic Kernel framework with Couchbase's vector search capabilities. The connector provides a seamless integration that allows developers to build AI-powered applications using familiar Semantic Kernel abstractions while leveraging Couchbase's vector indexing for high-performance semantic search.
3434

3535
The connector supports three index types:
36-
- **BHIVE** (Hyperscale Vector Index) - for pure vector search at scale ← *Used in this demo*
36+
- **Hyperscale Vector Index** - for pure vector search at scale ← *Used in this demo*
3737
- **Composite Vector Index** - for vector search with heavy scalar filtering
3838
- **FTS** (Full-Text Search) - for hybrid text + semantic search
3939

@@ -49,7 +49,7 @@ This makes the connector ideal for RAG (Retrieval-Augmented Generation) applicat
4949

5050
### 2. OpenAI API Access
5151
- **OpenAI API Key** - Get one from: https://platform.openai.com/api-keys
52-
- Used for generating text embeddings with `text-embedding-ada-002` model
52+
- Used for generating text embeddings with `text-embedding-3-small` model
5353
- Ensure you have sufficient API quota for embedding generation
5454

5555
### 3. Development Environment
@@ -79,7 +79,7 @@ Update `appsettings.Development.json` with your credentials:
7979
{
8080
"OpenAI": {
8181
"ApiKey": "your-openai-api-key-here",
82-
"EmbeddingModel": "text-embedding-ada-002"
82+
"EmbeddingModel": "text-embedding-3-small"
8383
},
8484
"Couchbase": {
8585
"ConnectionString": "couchbase://localhost",
@@ -133,22 +133,22 @@ Ensure you have the bucket, scope, and collection ready in Couchbase:
133133

134134
This step demonstrates how the connector works with Semantic Kernel's vector store abstractions:
135135

136-
**Getting the Collection** - The demo uses `CouchbaseVectorStore.GetCollection<TKey, TRecord>()` to obtain a collection reference configured for BHIVE index:
136+
**Getting the Collection** - The demo uses `CouchbaseVectorStore.GetCollection<TKey, TRecord>()` to obtain a collection reference configured for Hyperscale index:
137137
```csharp
138138
var vectorStore = new CouchbaseVectorStore(scope);
139139
var collection = vectorStore.GetCollection<string, Glossary>(
140140
"glossary",
141141
new CouchbaseQueryCollectionOptions
142142
{
143-
IndexName = "bhive_glossary_index", // BHIVE index name
143+
IndexName = "hyperscale_glossary_index", // Hyperscale index name
144144
SimilarityMetric = "cosine"
145145
}
146146
);
147147
```
148148

149-
The `CouchbaseQueryCollectionOptions` works with both BHIVE and composite indexes - simply specify the appropriate index name. For FTS indexes, use `CouchbaseSearchCollection` with `CouchbaseSearchCollectionOptions` instead.
149+
The `CouchbaseQueryCollectionOptions` works with both Hyperscale and Composite indexes - simply specify the appropriate index name. For FTS indexes, use `CouchbaseSearchCollection` with `CouchbaseSearchCollectionOptions` instead.
150150

151-
**Automatic Embedding Generation** - The connector integrates with Semantic Kernel's `IEmbeddingGenerator` interface to automatically generate embeddings from text. When you provide an embedding generator (in this case, OpenAI's `text-embedding-ada-002`), the text is automatically converted to vectors:
151+
**Automatic Embedding Generation** - The connector integrates with Semantic Kernel's `IEmbeddingGenerator` interface to automatically generate embeddings from text. When you provide an embedding generator (in this case, OpenAI's `text-embedding-3-small`), the text is automatically converted to vectors:
152152

153153
```csharp
154154
// Generate embedding from text
@@ -176,12 +176,12 @@ This creates 6 sample glossary entries with technical terms, generates embedding
176176
}
177177
```
178178

179-
### Step 3: BHIVE Index Creation
179+
### Step 3: Hyperscale Index Creation
180180

181-
This demo uses a **BHIVE (Hyperscale Vector Index)** - optimized for pure vector searches without heavy scalar filtering. After documents are inserted, the demo creates the BHIVE index:
181+
This demo uses a **Hyperscale Vector Index** - optimized for pure vector searches without heavy scalar filtering. After documents are inserted, the demo creates the Hyperscale index:
182182

183183
```sql
184-
CREATE VECTOR INDEX `bhive_glossary_index`
184+
CREATE VECTOR INDEX `hyperscale_glossary_index`
185185
ON `demo`.`semantic-kernel`.`glossary` (DefinitionEmbedding VECTOR)
186186
INCLUDE (Category, Term, Definition)
187187
USING GSI WITH {
@@ -191,18 +191,18 @@ USING GSI WITH {
191191
}
192192
```
193193

194-
**BHIVE Index Configuration:**
195-
- **Index Type**: BHIVE (Hyperscale Vector Index) - best for pure vector similarity searches
194+
**Hyperscale Index Configuration:**
195+
- **Index Type**: Hyperscale Vector Index - best for pure vector similarity searches
196196
- **Vector Field**: `DefinitionEmbedding` (1536 dimensions)
197197
- **Similarity**: `cosine` (optimal for OpenAI embeddings)
198198
- **Include Fields**: Non-vector fields for faster retrieval
199199
- **Quantization**: `IVF,SQ8` (Inverted File with 8-bit scalar quantization)
200200

201-
> **Note**: Composite vector indexes can be created similarly by adding scalar fields to the index definition. Use composite indexes when your queries frequently filter on scalar values before vector comparison. For this demo, we use BHIVE since we're demonstrating pure semantic search capabilities.
201+
> **Note**: Composite vector indexes can be created similarly by adding scalar fields to the index definition. Use Composite indexes when your queries frequently filter on scalar values before vector comparison. For this demo, we use Hyperscale since we're demonstrating pure semantic search capabilities.
202202
203203
### Step 4: Vector Search Operations
204204

205-
The demo performs two types of searches using the connector's `SearchAsync()` method with the BHIVE index:
205+
The demo performs two types of searches using the connector's `SearchAsync()` method with the Hyperscale index:
206206

207207
#### Pure Vector Search
208208

@@ -230,7 +230,7 @@ LIMIT 1
230230

231231
#### Filtered Vector Search
232232

233-
Even with a BHIVE index (designed for pure vector search), the connector supports filtering using LINQ expressions with `VectorSearchOptions`:
233+
Even with a Hyperscale index (designed for pure vector search), the connector supports filtering using LINQ expressions with `VectorSearchOptions`:
234234
```csharp
235235
// Search with scalar filter
236236
var results = await collection.SearchAsync(
@@ -255,15 +255,15 @@ LIMIT 1
255255
**Query**: *"How do I provide additional context to an LLM?"*
256256
**Expected Result**: Finds "RAG" entry within AI category
257257

258-
> **Note**: While BHIVE indexes support filtering as shown above, for scenarios where you frequently filter on scalar values with highly selective filters, consider using a **composite vector index** instead. The index creation syntax is similar - just add the scalar fields to the index definition. The connector's `SearchAsync()` method works identically with both index types.
258+
> **Note**: While Hyperscale indexes support filtering as shown above, for scenarios where you frequently filter on scalar values with highly selective filters, consider using a **Composite vector index** instead. The index creation syntax is similar - just add the scalar fields to the index definition. The connector's `SearchAsync()` method works identically with both index types.
259259
260260
## Understanding Vector Index Configuration
261261

262262
Couchbase offers three types of vector indexes optimized for different use cases:
263263

264264
### Index Types
265265

266-
**1. Hyperscale Vector Indexes (BHIVE)***This demo uses BHIVE*
266+
**1. Hyperscale Vector Indexes***This demo uses Hyperscale*
267267
- Uses SQL++ queries via `CouchbaseQueryCollection`
268268
- Best for pure vector searches without complex scalar filtering
269269
- Designed to scale to billions of vectors with low memory footprint
@@ -276,7 +276,7 @@ Couchbase offers three types of vector indexes optimized for different use cases
276276
- Best for filtered vector searches combining vector similarity with scalar filters
277277
- Efficient when scalar filters significantly reduce the search space
278278
- Ideal for: Compliance filtering, user-specific searches, time-bounded queries
279-
- **Creation**: Similar to BHIVE but includes scalar fields in the index definition
279+
- **Creation**: Similar to Hyperscale but includes scalar fields in the index definition
280280

281281
**3. FTS (Full-Text Search) Indexes**
282282
- Uses Couchbase Search API via `CouchbaseSearchCollection`
@@ -289,7 +289,7 @@ Couchbase offers three types of vector indexes optimized for different use cases
289289
All three index types work with the same Semantic Kernel abstractions (`SearchAsync()`, `UpsertAsync()`, etc.). The main difference is which collection class you instantiate and the underlying query engine.
290290

291291
**Choosing the Right Type**:
292-
- Start with **BHIVE** for pure vector searches and large datasets
292+
- Start with **Hyperscale** for pure vector searches and large datasets
293293
- Use **Composite** when scalar filters eliminate large portions of data before vector comparison
294294
- Use **FTS** when you need hybrid search combining full-text and semantic search
295295

@@ -330,15 +330,15 @@ dotnet run
330330

331331
### Expected Output
332332
```
333-
Couchbase BHIVE Vector Search Demo
333+
Couchbase Hyperscale Vector Search Demo
334334
====================================
335-
Using OpenAI model: text-embedding-ada-002
335+
Using OpenAI model: text-embedding-3-small
336336
Step 1: Ingesting data into Couchbase vector store...
337337
Data ingestion completed
338338
339-
Step 2: Creating BHIVE vector index manually...
340-
Executing BHIVE index creation query...
341-
BHIVE vector index 'bhive_glossary_index' already exists.
339+
Step 2: Creating Hyperscale vector index manually...
340+
Executing Hyperscale index creation query...
341+
Hyperscale vector index 'hyperscale_glossary_index' already exists.
342342
343343
Step 3: Performing vector search...
344344
Found: API
@@ -370,7 +370,7 @@ The Couchbase Semantic Kernel connector provides a seamless integration between
370370

371371
**Vector Store Classes:**
372372
- **`CouchbaseVectorStore`** - Main entry point for vector store operations
373-
- **`CouchbaseQueryCollection`** - Collection class for BHIVE and Composite indexes (SQL++)
373+
- **`CouchbaseQueryCollection`** - Collection class for Hyperscale and Composite indexes (SQL++)
374374
- **`CouchbaseSearchCollection`** - Collection class for FTS indexes (Search API)
375375

376376
**Common Methods (all index types):**
@@ -380,7 +380,7 @@ The Couchbase Semantic Kernel connector provides a seamless integration between
380380
- **`VectorSearchOptions`** - Configures search behavior including filters and result count
381381

382382
**Configuration Options:**
383-
- **`CouchbaseQueryCollectionOptions`** - For BHIVE and Composite indexes
383+
- **`CouchbaseQueryCollectionOptions`** - For Hyperscale and Composite indexes
384384
- **`CouchbaseSearchCollectionOptions`** - For FTS indexes
385385

386386
For more documentation, visit the [connector repository](https://github.com/Couchbase-Ecosystem/couchbase-semantic-kernel).

0 commit comments

Comments
 (0)