Skip to main content

Notifications

Power Platform Community / Forums / General / Vector search in copil...
General
Unanswered

Vector search in copilot studio

Posted on by 10

Hi all,

 

Is it possible to use vector search in Copilot Studio? I have a knowledge database in multiple languages, so therefore vector search would be my preferred search method.

 

However, when I have configured "Azure OpenAI on your data" in the Azure OpenAI studio with vector search enabled, I cannot deploy to Copilot Studio and I have to disable the vector search.

 

Anyone encountering the same problem? Do you have some workaround?


Thank you so much for your help! 🙂

kirstvh_0-1714394135423.pngkirstvh_1-1714394169250.png

@HenryJammes 

 

Kind regards, 

Kirsten

Categories:
  • YassineI Profile Picture
    YassineI 46 on at
    Re: Vector search in copilot studio

    @kirstvh Now I remember why I did that !! 😁

     

    The goal was to provide a conversation history to the first step of your RAG to turn the user's request into a search query (in my previous message = step 2). Without context, some questions may not be properly addressed.

     

    Here's an example:

    • Q1: What is Power Automate?
    • R1: It's a thing in Power Platform etc.
    • Q2: Is it part of Fabric?
    • R2: The result will not be relevant because it lacks some context. It don't know about the previous question about power automate. The AI search index will not provide relevant chunks and then the result will be bad. 

    Voilà voilà ! Hope it helps !

  • kirstvh Profile Picture
    kirstvh 10 on at
    Re: Vector search in copilot studio

    @YassineI Okay, then we are completely aligned! Thank you so much again and have a great day! 😊

  • YassineI Profile Picture
    YassineI 46 on at
    Re: Vector search in copilot studio

    Great point! In fact, I did it, because I was trying to replace the generative response node with a GPT model.

    I think you're right, if you use the generative response node, Copilot Studio will do the work for you.

  • kirstvh Profile Picture
    kirstvh 10 on at
    Re: Vector search in copilot studio

    @YassineI Thank you for your insightful answer! This really helps a lot, I will try to implement your proposal. 😊

     

    Could you elaborate a bit on why we need the ConversationHistory variable and why we need to append it with the generated answer? Isn't this something that happens automatically? Thanks!

  • YassineI Profile Picture
    YassineI 46 on at
    Re: Vector search in copilot studio

    Hey @kirstvh !

     

    There is a workaround for that 😊

     

    There is a built-in feature to perform HTTP calls directly from Copilot Studio. This powerful tool also allows you to parse the output of your call directly. You can use it to perform the RAG with your index. Alternatively, you can use PowerAutomate for this processing. Then you sent the results of the search index to a generative answers node. 

     

    1. Append a variable with the user's message (conversationHistory).

    2. Make an HTTP call to your GPT deployment to turn the user's message into a search query (you simply instruct your GPT model to convert the user's message into a short search query). Refer to Azure OpenAI Service REST API reference - Azure OpenAI | Microsoft Learn for more details.

    3. Make an HTTP call to your embedding model to convert the search query into a vector. The guide on How to generate embeddings with Azure OpenAI Service - Azure OpenAI | Microsoft Learn might be useful.

    4. Make an HTTP call to your index (hybrid search). Hybrid query - Azure AI Search | Microsoft Learn.

    5. Follow this tutorial to format the data for your generative answer node (Use a custom data source for generative answers - Microsoft Copilot Studio | Microsoft Learn). You will need to use some PowerFx (setVariable node) to parse the output of the hybrid search and add the conversationHistory. (GPT models are very good to generate PowerFx 😁 )

    6. Append your ConversationHistory variable with the generated answer.

    It's a bit tricky, but once set up, it works smoothly and the results are really improved. 

    I hope it helps ! 

     

    Yassine

  • remidyon Profile Picture
    remidyon on at
    Re: Vector search in copilot studio

    Hello @kirstvh 

    Vector search is not yet supported by Copilot Studio when extending with Azure OpenAI.

    Stay tuned for our Microsoft Build event (21-23 May) for more details on the future roadmap of this feature.

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,954

#3
Expiscornovus Profile Picture

Expiscornovus 1,637