Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Implement Azure AI Search types for vector, semantic and hybrid searches #4042

Open
1 task done
dareima opened this issue Sep 13, 2024 · 2 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@dareima
Copy link

dareima commented Sep 13, 2024

What features would you like to see added?

Currently, when utilizing the Azure AI Search tool, it only queries the Azure Search Index using keyword search (full or simple).

For example, to configure Hybrid (vector + keyword) the queryType would be vector_simple_hybrid.

2024-09-13 18:26:06 2024-09-13 16:26:06 error: Azure AI Search request failed Error "vector_simple_hybrid is not a valid value for searchRequest.queryType. The valid values are: ["simple","full","semantic"]." occurred in serializing the payload - undefined.

Configuring semantic would indeed be great, too, however that requires that a semanticConfiguration is set, such as azureml-default.

2024-09-13 18:37:32 2024-09-13 16:37:32 error: Azure AI Search request failed The parameter 'semanticConfiguration' must not be empty. Alternatively, set a default semantic configuration for this index. 2024-09-13 18:37:32 Parameter name: semanticConfiguration

We know the semanticConfiguration can be set directly on the index itself but the ability to configure this via .env for instance, would be much more convenient.

More details

When considering to implement this, I suppose supporting all available queryTypes would make sense:

Semantic : semantic
Hybrid + semantic : vector_semantic_hybrid
Hybrid (vector + keyword) : vector_simple_hybrid
Vector : vector

Here's a JSON example from the Azure AI Studio playground for Hybrid + semantic

    extra_body={
      "data_sources": [{
          "type": "azure_search",
          "parameters": {
            "filter": None,
            "endpoint": f"{search_endpoint}",
            "index_name": "ai-index-dev",
            "semantic_configuration": "azureml-default",
            "authentication": {
              "type": "api_key",
              "key": f"{search_key}"
            },
            "embedding_dependency": {
              "type": "endpoint",
              "endpoint": "https://ai-abcdefghijkl.openai.azure.com/openai/deployments/text-embedding-ada-002/embeddings?api-version=2023-07-01-preview",
              "authentication": {
                "type": "api_key",
                "key": "abcdefghijklmnopqrstuvwxyz"
              }
            },
            "query_type": "vector_semantic_hybrid",
            "in_scope": True,
            "role_information": "You are an AI assistant that helps people find information.",
            "strictness": 3,
            "top_n_documents": 5

Which components are impacted by your request?

Endpoints

Pictures

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dareima dareima added the enhancement New feature or request label Sep 13, 2024
@RAPHCVR
Copy link

RAPHCVR commented Sep 14, 2024

@dareima
Hey, I am working on a tool for librechat for using AIsearch with vector.
I already have a code snippets that works with JS and return a JSON string.
I will try to implement it now locally.

@angpao
Copy link

angpao commented Oct 21, 2024

So If you implemented , It will increase speed uploading excel file , right? Please let me know how to config that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
3 participants