Hi Hardono Arifanto,
Welcome to the Microsoft Q&A forum. Thanks for your question.
You're using Azure AI Search on a SharePoint index to search for organizational data, and you've introduced a custom "tags" field to improve searchability. However, you're encountering an issue where the Azure OpenAI Chat Completions API does not return Document B (which has the "authorization limits" tag), while searching directly on the SharePoint index returns the correct document.
Below could be the possible reasons and solutions:
- Semantic Configuration Not Fully Honored by OpenAI API:
You’ve configured semantic search in your SharePoint index with the tags field under prioritizedKeywordsFields. This field should be prioritized in searches. However, the Azure OpenAI Chat Completions API may not be fully honoring the semantic configuration when it retrieves documents.
To address this, ensure that your API request is correctly using the semantic configuration and prioritizing the tags field.
- Scoring Profiles Not Applied:
In your index definition, there are no scoring profiles defined. Scoring profiles can be used to enhance the ranking of documents based on fields like "tags."
Consider defining a scoring profile where the tags field is given higher weight to improve the search relevance and ensure that documents like Document B are ranked appropriately.
Add Scoring Profiles in Azure AI Search
- Field Indexing Configuration:
In your index definition, the tags field is marked as searchable and retrievable, which should make it available in search queries. Ensure that it’s indexed properly to allow effective search ranking.
Learn how to define and configure fields in Azure AI Search
- Search Parameters in the OpenAI API Call:
Double-check the parameters you’re using when calling the Azure OpenAI Chat Completions API. Specifically, ensure you're passing the correct parameters to make use of semantic search and that it uses the tags field when ranking documents.
If necessary, refine your query to ensure it's configured to prioritize the tags field in the OpenAI API call.
Ensure that your Azure AI Search and Azure OpenAI services are correctly integrated. You might need to explicitly reference fields like tags in your API call for accurate results.
Integrate Azure AI Search with OpenAI API
Exploring Advanced Tagging with Syntex:
If you’re leveraging Microsoft Syntex for automatic metadata tagging, ensure that your tags are being applied correctly at the document level and are indexed in SharePoint for use in search.
Overview of Taxonomy Tagging in Microsoft Syntex
Optimizing Search Ranking:
To further optimize search ranking, consider using a scoring profile and boosting the relevance of tags, content type, and other fields that are critical to your search scenario.
Scoring Profiles in Azure AI Search
Use Retrieval-Augmented Generation:
Consider incorporating Retrieval-Augmented Generation (RAG) techniques to further refine your search. This combines the power of AI search with a generative model, helping provide more accurate and contextually relevant completions.
Retrieval-Augmented Generation - Azure AI Foundry
To resolve your issue, please ensure your semantic search configuration is being fully respected in the OpenAI API call or defining a scoring profile that prioritizes the tags field. or consider reviewing and adjusting your API search parameters to ensure correct results based on your SharePoint index and tags field.
Once these steps are applied, your OpenAI API search should return Document B as expected, using the tags field to rank results more accurately.
Feel free to ask if you need more assistance or specific configuration steps.
Regards,
Chakravarthi Rangarajan Bhargavi
- If this answer helped, please click 'Yes' and accept the answer to help others in the community. Thank you! 😊