Skip to content

Commit df2e40a

Browse files
Roopan-MicrosoftAjitPadhi-MicrosoftPavan-Microsoftross-p-smithgpickett
authored
feat: Added EXP Changes, Model updates & End to End tests (#1828)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Ajit Padhi <[email protected]> Co-authored-by: Pavan-Microsoft <[email protected]> Co-authored-by: Ross Smith <[email protected]> Co-authored-by: gpickett <[email protected]> Co-authored-by: Francia Riesco <[email protected]> Co-authored-by: Francia Riesco <[email protected]> Co-authored-by: Prajwal D C <[email protected]> Co-authored-by: Harmanpreet-Microsoft <[email protected]> Co-authored-by: UtkarshMishra-Microsoft <[email protected]> Co-authored-by: Priyanka-Microsoft <[email protected]> Co-authored-by: Prasanjeet-Microsoft <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kiran-Siluveru-Microsoft <[email protected]> Co-authored-by: Prashant-Microsoft <[email protected]> Co-authored-by: Rohini-Microsoft <[email protected]> Co-authored-by: Avijit-Microsoft <[email protected]> Co-authored-by: RaviKiran-Microsoft <[email protected]> Co-authored-by: Somesh Joshi <[email protected]> Co-authored-by: Himanshi Agrawal <[email protected]> Co-authored-by: pradeepjha-microsoft <[email protected]> Co-authored-by: Harmanpreet Kaur <[email protected]> Co-authored-by: Bangarraju-Microsoft <[email protected]> Co-authored-by: Harsh-Microsoft <[email protected]> Co-authored-by: Kanchan-Microsoft <[email protected]> Co-authored-by: Cristopher Coronado <[email protected]> Co-authored-by: Cristopher Coronado Moreira <[email protected]> Co-authored-by: Vamshi-Microsoft <[email protected]> Co-authored-by: Thanusree-Microsoft <[email protected]> Co-authored-by: Niraj Chaudhari (Persistent Systems Inc) <[email protected]>
1 parent f1030fa commit df2e40a

25 files changed

+413
-221
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ Select either "PostgreSQL" or "Cosmos DB":
194194

195195
When Deployment is complete, follow steps in [Set Up Authentication in Azure App Service](./docs/azure_app_service_auth_setup.md) to add app authentication to your web app running on Azure App Service
196196

197-
**Note**: The default configuration deploys an OpenAI Model "gpt-4o" with version 2024-05-13. However, not all
197+
**Note**: The default configuration deploys an OpenAI Model "gpt-4.1" with version 2025-04-14. However, not all
198198
locations support this version. If you're deploying to a location that doesn't support version 2024-05-13, you'll need to
199199
switch to a lower version. To find out which versions are supported in different regions, visit the
200-
[GPT-4o Model Availability](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#global-standard-model-availability) page.
200+
[GPT-4.1 Model Availability](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#global-standard-model-availability) page.
201201

202202
### Testing the deployment
203203
1. Navigate to the admin site, where you can upload documents. It will be located at:

code/backend/batch/utilities/helpers/env_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ def __load_config(self, **kwargs) -> None:
174174
else:
175175
# Otherwise, fallback to individual environment variables
176176
self.AZURE_OPENAI_MODEL = os.getenv(
177-
"AZURE_OPENAI_MODEL", "gpt-4o"
177+
"AZURE_OPENAI_MODEL", "gpt-4.1"
178178
)
179179
self.AZURE_OPENAI_MODEL_NAME = os.getenv(
180-
"AZURE_OPENAI_MODEL_NAME", "gpt-4o"
180+
"AZURE_OPENAI_MODEL_NAME", "gpt-4.1"
181181
)
182182

183183
self.AZURE_OPENAI_VISION_MODEL = os.getenv("AZURE_OPENAI_VISION_MODEL", "gpt-4")

code/tests/functional/tests/backend_api/default/test_conversation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def completions_mocking(httpserver: HTTPServer, app_config: AppConfig):
6565
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
6666
"object": "chat.completion",
6767
"created": 1679072642,
68-
"model": "gpt-4o",
68+
"model": "gpt-4.1",
6969
"usage": {
7070
"prompt_tokens": 40,
7171
"completion_tokens": 50,

code/tests/functional/tests/backend_api/default/test_post_prompt_tool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def completions_mocking(httpserver: HTTPServer, app_config: AppConfig):
100100
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
101101
"object": "chat.completion",
102102
"created": 1679072642,
103-
"model": "gpt-4o",
103+
"model": "gpt-4.1",
104104
"usage": {
105105
"prompt_tokens": 40,
106106
"completion_tokens": 50,
@@ -132,7 +132,7 @@ def test_post_responds_successfully_when_not_filtered(
132132
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
133133
"object": "chat.completion",
134134
"created": 1679072642,
135-
"model": "gpt-4o",
135+
"model": "gpt-4.1",
136136
"usage": {
137137
"prompt_tokens": 40,
138138
"completion_tokens": 50,
@@ -193,7 +193,7 @@ def test_post_responds_successfully_when_filtered(
193193
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
194194
"object": "chat.completion",
195195
"created": 1679072642,
196-
"model": "gpt-4o",
196+
"model": "gpt-4.1",
197197
"usage": {
198198
"prompt_tokens": 40,
199199
"completion_tokens": 50,
@@ -254,7 +254,7 @@ def test_post_makes_correct_call_to_openai_from_post_prompt_tool(
254254
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
255255
"object": "chat.completion",
256256
"created": 1679072642,
257-
"model": "gpt-4o",
257+
"model": "gpt-4.1",
258258
"usage": {
259259
"prompt_tokens": 40,
260260
"completion_tokens": 50,

code/tests/functional/tests/backend_api/integrated_vectorization_custom_conversation/test_iv_question_answer_tool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def completions_mocking(httpserver: HTTPServer, app_config: AppConfig):
6363
"id": "chatcmpl-6v7mkQj980V1yBec6ETrKPRqFjNw9",
6464
"object": "chat.completion",
6565
"created": 1679072642,
66-
"model": "gpt-4o",
66+
"model": "gpt-4.1",
6767
"usage": {
6868
"prompt_tokens": 40,
6969
"completion_tokens": 50,

docs/LOCAL_DEPLOYMENT.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ The easiest way to run this accelerator is in a VS Code Dev Containers, which wi
1212
1. In the VS Code window that opens, once the project files show up (this may take several minutes), open a terminal window
1313
1. Run `azd auth login`
1414
1. Run `azd env set AZURE_APP_SERVICE_HOSTING_MODEL code` - This sets your environment to deploy code rather than rely on public containers, like the "Deploy to Azure" button.
15+
1. To use an existing Log Analytics workspace, follow the [setup steps here](../docs/re-use-log-analytics.md) before running `azd up`.
16+
1. To use an existing Resource Group, follow the [setup steps here](../docs/re-use-resource-group.md) before running `azd up`.
1517
1. Run `azd up` - This will provision Azure resources and deploy the accelerator to those resources.
1618

1719
* **Important**: Beware that the resources created by this command will incur immediate costs, primarily from the AI Search resource. These resources may accrue costs even if you interrupt the command before it is fully executed. You can run `azd down` or delete the resources manually to avoid unnecessary spending.
@@ -191,7 +193,7 @@ Execute the above [shell command](#L81) to run the function locally. You may nee
191193
|AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION ||Whether to use [Integrated Vectorization](https://learn.microsoft.com/en-us/azure/search/vector-search-integrated-vectorization)|
192194
|AZURE_OPENAI_RESOURCE||the name of your Azure OpenAI resource|
193195
|AZURE_OPENAI_MODEL||The name of your model deployment|
194-
|AZURE_OPENAI_MODEL_NAME|gpt-4o|The name of the model|
196+
|AZURE_OPENAI_MODEL_NAME|gpt-4.1|The name of the model|
195197
|AZURE_OPENAI_MODEL_VERSION|2024-05-13|The version of the model to use|
196198
|AZURE_OPENAI_API_KEY||One of the API keys of your Azure OpenAI resource|
197199
|AZURE_OPENAI_EMBEDDING_MODEL|text-embedding-ada-002|The name of your Azure OpenAI embeddings model deployment|

docs/TEAMS_LOCAL_DEPLOYMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Or use the [Azure Functions VS Code extension](https://marketplace.visualstudio.
6565
|AZURE_SEARCH_FILTER||Filter to apply to search queries.|
6666
|AZURE_OPENAI_RESOURCE||the name of your Azure OpenAI resource|
6767
|AZURE_OPENAI_MODEL||The name of your model deployment|
68-
|AZURE_OPENAI_MODEL_NAME|gpt-4o|The name of the model|
68+
|AZURE_OPENAI_MODEL_NAME|gpt-4.1|The name of the model|
6969
|AZURE_OPENAI_API_KEY||One of the API keys of your Azure OpenAI resource|
7070
|AZURE_OPENAI_EMBEDDING_MODEL|text-embedding-ada-002|The name of you Azure OpenAI embeddings model deployment|
7171
|AZURE_OPENAI_TEMPERATURE|0|What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. A value of 0 is recommended when using your data.|

docs/contract_assistance.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ The following is the Chat With Your Data infrastructure configuration that we su
1010
- **Azure Semantic Search**: Utilize Azure Semantic Search to efficiently index and search legal documents. This provides powerful search capabilities and integration with other Azure services.
1111
- **Azure Cognitive Search Top K 15**: Set the Top K parameter to 15 to retrieve the top 15 most relevant documents. This configuration helps in providing precise and relevant search results for user queries.
1212
- **Azure Search Integrated Vectorization**: Enable integrated vectorization in Azure Search to improve the semantic understanding and relevance of search results. This enhances the Contract Assistant's ability to provide contextually accurate answers.
13-
- **Azure OpenAI Model gpt-4o**: Leverage the Azure OpenAI model gpt-4o for advanced natural language processing capabilities. This model is well-suited for handling complex legal queries and providing detailed and contextually appropriate responses.
13+
- **Azure OpenAI Model gpt-4.1**: Leverage the Azure OpenAI model gpt-4.1 for advanced natural language processing capabilities. This model is well-suited for handling complex legal queries and providing detailed and contextually appropriate responses.
1414
- **Orchestration Strategy: Semantic Kernel**: Implement the Semantic Kernel orchestration strategy to effectively manage the integration and interaction between different components of the infrastructure. This strategy ensures seamless operation and optimal performance of the Contract Assistant.
15-
- **Conversation Flow Options**: Setting `CONVERSATION_FLOW` enables running advanced AI models like GPT-4o on your own enterprise data without needing to train or fine-tune models.
15+
- **Conversation Flow Options**: Setting `CONVERSATION_FLOW` enables running advanced AI models like GPT-4.1 on your own enterprise data without needing to train or fine-tune models.
1616

1717
By following these infrastructure configurations, you can enhance the efficiency, accuracy, and overall performance of the Chat With Your Data Contract Review and Summarization Assistant, ensuring it meets the high demands and expectations of professionals.
1818

@@ -22,8 +22,8 @@ To apply the suggested configurations in your deployment, update the following f
2222
- **Azure Semantic Search**: Set `AZURE_SEARCH_USE_SEMANTIC_SEARCH` to `true`
2323
- **Azure Cognitive Search Top K 15**: Set `AZURE_SEARCH_TOP_K` to `15`.
2424
- **Azure Search Integrated Vectorization**: Set `AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION` to `true`.
25-
- **Azure OpenAI Model**: Set `AZURE_OPENAI_MODEL` to `gpt-4o`.
26-
- **Azure OpenAI Model Name**: Set `AZURE_OPENAI_MODEL_NAME` to `gpt-4o`. (could be different based on the name of the Azure OpenAI model deployment)
25+
- **Azure OpenAI Model**: Set `AZURE_OPENAI_MODEL` to `gpt-4.1`.
26+
- **Azure OpenAI Model Name**: Set `AZURE_OPENAI_MODEL_NAME` to `gpt-4.1`. (could be different based on the name of the Azure OpenAI model deployment)
2727
- **Azure OpenAI Model Name Version**: Set `AZURE_OPENAI_MODEL_VERSION` to `2024-05-13`.
2828
- **Conversation Flow Options**: Set `CONVERSATION_FLOW` to `byod`
2929
- **Orchestration Strategy**: Set `ORCHESTRATION_STRATEGY` to `Semantic Kernel`.

docs/employee_assistance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ The following is the Chat With Your Data infrastructure configuration that we su
1010
- **Azure Semantic Search**: Utilize Azure Semantic Search to efficiently index and search employee handbooks and corporate policy documents. This provides powerful search capabilities and integration with other Azure services.
1111
- **Azure Cognitive Search Top K 15**: Set the Top K parameter to 15 to retrieve the top 15 most relevant documents. This configuration helps in providing precise and relevant search results for user queries.
1212
- **Azure Search Integrated Vectorization**: Enable integrated vectorization in Azure Search to improve the semantic understanding and relevance of search results. This enhances the Contract Assistant's ability to provide contextually accurate answers.
13-
- **Azure OpenAI Model gpt-4o**: Leverage the Azure OpenAI model gpt-4o for advanced natural language processing capabilities. This model is well-suited for handling complex legal queries and providing detailed and contextually appropriate responses.
13+
- **Azure OpenAI Model gpt-4.1**: Leverage the Azure OpenAI model gpt-4.1 for advanced natural language processing capabilities. This model is well-suited for handling complex legal queries and providing detailed and contextually appropriate responses.
1414
- **Orchestration Strategy: Semantic Kernel**: Implement the Semantic Kernel orchestration strategy to effectively manage the integration and interaction between different components of the infrastructure. This strategy ensures seamless operation and optimal performance of the Employee Assistant.
15-
- **Conversation Flow Options**: Setting `CONVERSATION_FLOW` enables running advanced AI models like GPT-4o on your own enterprise data without needing to train or fine-tune models.
15+
- **Conversation Flow Options**: Setting `CONVERSATION_FLOW` enables running advanced AI models like GPT-4.1 on your own enterprise data without needing to train or fine-tune models.
1616

1717
By following these infrastructure configurations, you can enhance the efficiency, accuracy, and overall performance of the Chat With Your Data Employee Assistant, ensuring it meets the high demands and expectations of professionals.
1818

@@ -22,7 +22,7 @@ To apply the suggested configurations in your deployment, update the following f
2222
- **Azure Semantic Search**: Set `AZURE_SEARCH_USE_SEMANTIC_SEARCH` to `true`
2323
- **Azure Cognitive Search Top K 15**: Set `AZURE_SEARCH_TOP_K` to `15`.
2424
- **Azure Search Integrated Vectorization**: Set `AZURE_SEARCH_USE_INTEGRATED_VECTORIZATION` to `true`.
25-
- **Azure OpenAI Model Info**: Set `AZURE_OPENAI_MODEL_INFO` to `{"model":"gpt-4o","modelName":"gpt-4o","modelVersion":"2024-05-13"}`.(model could be different based on the name of the Azure OpenAI model deployment).
25+
- **Azure OpenAI Model Info**: Set `AZURE_OPENAI_MODEL_INFO` to `{"model":"gpt-4.1","modelName":"gpt-4.1","modelVersion":"2025-04-14"}`.(model could be different based on the name of the Azure OpenAI model deployment).
2626
- **Conversation Flow Options**: Set `CONVERSATION_FLOW` to `byod`
2727
- **Orchestration Strategy**: Set `ORCHESTRATION_STRATEGY` to `Semantic Kernel`.
2828

docs/images/logAnalytics.png

142 KB
Loading

0 commit comments

Comments
 (0)