Skip to content

Commit d0a5151

Browse files
Update vector size
1 parent 6414f2c commit d0a5151

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

EssentialCSharp.Chat.Shared/Models/BookContentChunk.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public sealed class BookContentChunk
4545

4646
/// <summary>
4747
/// Vector embedding for the chunk text - will be generated by embedding service
48-
/// Using 1536 dimensions for Azure OpenAI text-embedding-3-small-v1
48+
/// Using 3072 dimensions for Azure OpenAI text-embedding-3-large
4949
/// Use CosineSimilarity distance function since we are using text-embedding-3 (https://platform.openai.com/docs/guides/embeddings#which-distance-function-should-i-use)
5050
/// Postgres supports only Hnsw: https://learn.microsoft.com/en-us/semantic-kernel/concepts/vector-store-connectors/out-of-the-box-connectors/postgres-connector?pivots=programming-language-csharp&WT.mc_id=8B97120A00B57354
5151
/// </summary>
52-
[VectorStoreVector(Dimensions: 1536, DistanceFunction = DistanceFunction.CosineSimilarity, IndexKind = IndexKind.Hnsw)]
52+
[VectorStoreVector(Dimensions: 3072, DistanceFunction = DistanceFunction.CosineSimilarity, IndexKind = IndexKind.Hnsw)]
5353
public ReadOnlyMemory<float>? TextEmbedding { get; set; }
5454
}

EssentialCSharp.Web/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"MaxMessagesPerWindow": 50
2020
},
2121
"AIOptions": {
22-
"VectorGenerationDeploymentName": "text-embedding-ada-002",
22+
"VectorGenerationDeploymentName": "text-embedding-3-large-v1",
2323
"ChatDeploymentName": "gpt-4o",
2424
"SystemPrompt": "You are a helpful AI assistant with expertise in C# programming and the Essential C# book content. You can help users understand C# concepts, answer programming questions, and provide guidance based on the Essential C# book materials. Be concise but thorough in your explanations.",
2525
"Endpoint": "",

0 commit comments

Comments
 (0)