microsoft / teams-ai

SDK focused on building AI based applications and extensions for Microsoft Teams and other Bot Framework channels
MIT License
349 stars 143 forks source link

[Dev support]: Citations when using Azure AI Search (or equivalent external data source) for augmentations #1693

Closed yikwen closed 3 weeks ago

yikwen commented 1 month ago

Please be sure to check the Discussions Q&A section before filing a new question.

Is it possible to generate citations from context used to generate an answer?

  1. Referring to the "Chat with Azure AI Search Data" Javascript sample here: https://github.com/microsoft/teams-ai/tree/main/js/samples/04.ai-apps/g.datasource-azureAISearch
  2. I've made a Python equivalent of the bot, which uses Azure AI Search as a data source for augmentations and also performs actions
  3. However, the context used for answering questions is not currently rendered as references / citations like the Azure OpenAI On Your Data here https://github.com/microsoft/teams-ai/tree/main/js/samples/04.ai-apps/h.datasource-azureOpenAI
  4. Is there a way to structure the response message such that it provides references when the data source is used as augmentation?

What you have tried already

Rewrote AzureAISearchDataSource.ts in Python. Works, but no citations.

goncafab commented 1 month ago

Just noticed this issue, it's related to the discussion I just created https://github.com/microsoft/teams-ai/discussions/1702

Same thing happens on my side.

corinagum commented 3 weeks ago

For Python, we are waiting for a couple of bug fixes that another customer has provided a PR for. Please track: https://github.com/microsoft/teams-ai/pull/1670 and: https://github.com/microsoft/teams-ai/pull/1697

Otherwise, you may need to enable public preview on your teams (either at the user or administrator level) in order to see citations.