Skip to content

Commit 12066a2

Browse files
committed
update docs for query rewriting
1 parent cb85432 commit 12066a2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/deploy_features.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ You should typically enable these features before running `azd up`. Once you've
1717
* [Enabling login and document level access control](#enabling-login-and-document-level-access-control)
1818
* [Enabling user document upload](#enabling-user-document-upload)
1919
* [Enabling CORS for an alternate frontend](#enabling-cors-for-an-alternate-frontend)
20+
* [Enabling query rewriting](#enabling-query-rewriting)
2021
* [Adding an OpenAI load balancer](#adding-an-openai-load-balancer)
2122
* [Deploying with private endpoints](#deploying-with-private-endpoints)
2223
* [Using local parsers](#using-local-parsers)
@@ -321,6 +322,13 @@ For an alternate frontend that's written in Web Components and deployed to Stati
321322
on [using a different backend](https://github.com/Azure-Samples/azure-search-openai-javascript#using-a-different-backend).
322323
Both these repositories adhere to the same [HTTP protocol for AI chat apps](https://aka.ms/chatprotocol).
323324

325+
## Enabling query rewriting
326+
327+
By default, [query rewriting](https://learn.microsoft.com/azure/search/semantic-how-to-query-rewrite) from the search service is not enabled. To enable query rewriting, set the following environment variables:
328+
329+
1. Ensure semantic ranker is enabled. Query rewriting may only be used with semantic ranker. Run `azd env set AZURE_SEARCH_SEMANTIC_RANKER free` or `azd env set AZURE_SEARCH_SEMANTIC_RANKER standard` depending on your desired [semantic ranker tier](https://learn.microsoft.com/azure/search/semantic-how-to-configure).
330+
1. Enable query rewriting. Run `azd env set AUZRE_SEARCH_QUERY_REWRITING true`. An option in developer settings will appear allowing you to toggle query rewriting on and off. It will be on by default.
331+
324332
## Adding an OpenAI load balancer
325333

326334
As discussed in more details in our [productionizing guide](./productionizing.md), you may want to consider implementing a load balancer between OpenAI instances if you are consistently going over the TPM limit.

0 commit comments

Comments
 (0)