-
Notifications
You must be signed in to change notification settings - Fork 6.7k
AzureAISearchTool - Object has no attribute 'semantic_config_name' #6430
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
Comments
@jay-thakur for awareness |
ack |
Full stack trace of the error when running. (Hope it's helpful)
|
thank you so much for sharing the stack trace @StellaSource-Carlisle. I am working on it. |
Could you please try below and let me know the output ?
and
|
Sure thing @jay-thakur . See below for the results of those requested changes. _cog_search_tool = AzureAISearchTool.create_hybrid_search(
name="call_cog_search_async",
endpoint=_settings.COG_SEARCH_ENDPOINT,
index_name=_settings.COG_SEARCH_INDEX,
credential=AzureKeyCredential(_settings.COG_SEARCH_KEY),
vector_fields=["description_vector"],
search_fields=["variant_description", "description"],
select_fields=[
"product_variant_id",
"product_description",
"Dimensions"
],
top=7,
query_type="semantic",
semantic_config_name ="default"
) Resulted in:
_cog_search_tool = AzureAISearchTool.create_hybrid_search(
name="call_cog_search_async",
endpoint=_settings.COG_SEARCH_ENDPOINT,
index_name=_settings.COG_SEARCH_INDEX,
credential=AzureKeyCredential(_settings.COG_SEARCH_KEY),
vector_fields=["description_vector"],
search_fields=["variant_description", "description"],
select_fields=[
"product_variant_id",
"product_description",
"Dimensions"
],
top=7,
query_type="simple",
semantic_config_name ="default"
) Resulted in:
Let me know if you'd like me to try anything else. |
Hi @StellaSource-Carlisle, thank you again for raising this issue and for your patience as we work through it. In my previous response, I mistakenly included To help us further isolate the issue, could you please try running your request again with only
I'm also working on a better mechanism to handle this more gracefully going forward, and I appreciate your support in the meantime. |
No worries at all @jay-thakur. Happy to help. So I updated our cog_search function to the following: _cog_search_tool = AzureAISearchTool.create_hybrid_search(
name="call_cog_search_async",
endpoint=_settings.COG_SEARCH_ENDPOINT,
index_name=_settings.COG_SEARCH_INDEX,
credential=AzureKeyCredential(_settings.COG_SEARCH_KEY),
vector_fields=["description_vector"],
search_fields=["product_description", "product_name"],
semantic_config_name = "upl_semantic",
api_version="2024-03-01-Preview",
select_fields=[
"p_id",
"p_description",
"p_name"
],
top=7
) This returned the following error message:
Side-note for you. I had to incorporate an
|
@StellaSource-Carlisle this new PR should resolve all these issues! Thanks for flagging them! Out of curiosity, I'd love to hear more about your use case if you're open to sharing. |
Fantastic news! Thanks so much @jay-thakur for getting that out there, much appreciated. Regarding use case, sure thing! We have a custom DB canonical that we front with Azure AI Search to help with deep/fuzzy searches against the database. Currently today, we utilize the prompt flows inside of Azure AI studio. However, we're limited by things in prompt flow with silly things, such as limiting response fields. I don't want the AI to utilize the vector fields as part of its context to facilitate the response. Adds unneeded cost and processing. Therefore, we're migrating the flow to our Agentic AutoGen solution for both speed and reduction of token usage resulting in cheaper and (more importantly) FASTER calls to get our results. |
## Why are these changes needed? Simplified the azure ai search tool and fixed bugs in the code ## Related issue number "Closes #6430 " ## Checks - [X] I've included any doc changes needed for <https://microsoft.github.io/autogen/>. See <https://github.com/microsoft/autogen/blob/main/CONTRIBUTING.md> to build and test documentation locally. - [X] I've added tests (if relevant) corresponding to the changes introduced in this PR. - [X] I've made sure all auto checks have passed. Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
This PR is merged now. Kindly try now and let me know if there is any issues. I really appreciate you sharing your use case on how you're using the Azure AI Search tool is resulting in cheaper and (more importantly) FASTER calls to get our results.! It's incredibly rewarding to hear about real-world applications like yours. I'm curious - are there any additional capabilities or features in the Azure AI Search tool that would be particularly helpful for your specific use case? I'm actively working on improvements, and your insights would be valuable for prioritizing what might benefit you most as customer/user. I'd love to stay connected to better understand your evolving needs and ensure the tool continues to serve your requirements. If you're open to it, I'd welcome connecting on LinkedIn : https://www.linkedin.com/in/jay-thakur/ Thank you again for sharing your experience - it truly helps drive meaningful development. |
Confirmed resolved in 0.5.7! Thank you so much @jay-thakur . For now, this greatly reduced our token usage, cost and improved the speed. Initial testing of migrating from the prompt flow to the Agent/Tool flow inside our Autogen deployment is a ~50% speed increase and a reduction of tokens by >90%! No additional capabilities as of yet needed with the Azure AI Search tool. Simply having the ability to have this granular control over the queries is lightyears past what we had in the prompt flow service (which was still pretty good!). Added you on LinkedIn, please keep in touch. Thanks again gents! |
What happened?
Bug Description
When attempting to run the
AzureAISearchTool.create_hybrid_search()
, we are receiving the error messageValueError: Error from Azure AI Search: 'AzureAISearchConfig' object has no attribute 'semantic_config_name'
To Reproduce
We have attempted to set the semantic_config_name explicitly to
None
to no avail.Expected behavior
The AzureAISearchTool is able to hit the CogSearch endpoint and aggregate the results.
Additional context
Attempted versions 0.5.2 - 0.5.5. Issues remains across all versions.
Which packages was the bug in?
Python Extensions (autogen-ext)
AutoGen library version.
Python 0.5.5
Other library version.
No response
Model used
No response
Model provider
Azure OpenAI
Other model provider
No response
Python version
3.13
.NET version
None
Operating system
MacOS
The text was updated successfully, but these errors were encountered: