Skip to content

Commit 2e8adf4

Browse files
authored
Update README.md with chat/ask question (#584)
1 parent 3ffa433 commit 2e8adf4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,23 @@ The primary differences:
228228
In `infra/main.bicep`, change `chatGptModelName` to 'gpt-4' instead of 'gpt-35-turbo'. You may also need to adjust the capacity above that line depending on how much TPM your account is allowed.
229229
</details>
230230

231+
<details>
232+
<summary>What is the difference between the Chat and Ask tabs?</summary>
233+
234+
The chat tab uses the approach programmed in [chatreadretrieveread.py](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/app/backend/approaches/chatreadretrieveread.py).
235+
236+
- It uses the ChatGPT API to turn the user question into a good search query.
237+
- It queries Azure Cognitive Search for search results for that query (optionally using the vector embeddings for that query).
238+
- It then combines the search results and original user question, and asks ChatGPT API to answer the question based on the sources. It includes the last 4K of message history as well (or however many tokens are allowed by the deployed model).
239+
240+
The ask tab uses the approach programmed in [retrievethenread.py](https://github.com/Azure-Samples/azure-search-openai-demo/blob/main/app/backend/approaches/retrievethenread.py).
241+
242+
- It queries Azure Cognitive Search for search results for the user question (optionally using the vector embeddings for that question).
243+
- It then combines the search results and user question, and asks ChatGPT API to answer the question based on the sources.
244+
245+
There are also two other /ask approaches with a slightly different approach, but they aren't currently working due to [langchain compatibility issues](https://github.com/Azure-Samples/azure-search-openai-demo/issues/541).
246+
</details>
247+
231248

232249
### Troubleshooting
233250

0 commit comments

Comments
 (0)