Skip to content

Commit 439f428

Browse files
authored
Merge pull request #203 from microsoft/dayland/revert-search-index-skillset-changes-for-unknown-lang
Fix token size default and model variant support
2 parents 4dd898c + 302fb3c commit 439f428

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ The Information Assistant Accelerator requires access to one of the following Az
132132
Model Name | Supported Versions
133133
---|---
134134
gpt-35-turbo | 0301, 0613
135-
gpt-35-turbo-16k | N/A
135+
**gpt-35-turbo-16k** | N/A
136136
**gpt-4** | N/A
137137
gpt-4-32k | N/A
138138

139-
**Important:** It is recommended to use gpt-4 models to achieve the best results from the IA Accelerator. Access to gpt-4 requires approval which can be requested [here](https://aka.ms/oai/get-gpt4). If gpt-4 access is not available gpt-35-turbo (0613) is recommended.
139+
**Important:** It is recommended to use gpt-4 models to achieve the best results from the IA Accelerator. Access to gpt-4 requires approval which can be requested [here](https://aka.ms/oai/get-gpt4). If gpt-4 access is not available gpt-35-turbo-16k (0613) is recommended.
140140

141141
---
142142

app/backend/approaches/chatreadretrieveread.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def run(self, history: Sequence[dict[str, str]], overrides: dict[str, Any]) -> A
262262
# STEP 3: Generate a contextual and content-specific answer using the search results and chat history.
263263
#Added conditional block to use different system messages for different models.
264264

265-
if self.model_name == "gpt-35-turbo":
265+
if self.model_name.startswith("gpt-35-turbo"):
266266
messages = self.get_messages_from_history(
267267
system_message,
268268
self.chatgpt_deployment,
@@ -292,7 +292,7 @@ def run(self, history: Sequence[dict[str, str]], overrides: dict[str, Any]) -> A
292292
n=1
293293
)
294294

295-
elif self.model_name == "gpt-4":
295+
elif self.model_name.startswith("gpt-4"):
296296
messages = self.get_messages_from_history(
297297
"Sources:\n" + content + "\n\n" + system_message,
298298
# system_message + "\n\nSources:\n" + content,

infra/main.bicep

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ param searchIndexName string = 'all-files-index'
5151
param chatGptDeploymentName string = 'chat'
5252
param chatGptModelName string = 'gpt-35-turbo'
5353
param chatGptDeploymentCapacity int = 30
54-
// metadata in our chunking strategy adds about 180 tokens to the size of the chunk, our default target size is 750 tokens so the prameter is set to 570
55-
param chunkTargetSize string = '570'
54+
// metadata in our chunking strategy adds about 180-200 tokens to the size of the chunks,
55+
// our default target size is 750 tokens so the chunk files that get indexed will be around 950 tokens each
56+
param chunkTargetSize string = '750'
5657
param targetPages string = 'ALL'
5758
param formRecognizerApiVersion string = '2022-08-31'
5859
param pdfSubmitQueue string = 'pdf-submit-queue'

0 commit comments

Comments
 (0)