AI Chatbot for Shareflex Contracts using Azure OpenAI and Azure AI Search (vectors)
Smart AI chatbot for Shareflex Contracts and documents, fully running on Microsoft Azure. The solution uses Azure OpenAI, Azure AI Search, vector embeddings, and semantic RAG search to intelligently search contracts based on meaning and context instead of simple keywords. The AI chat runs directly inside WordPress and can answer natural language questions while linking directly to SharePoint contract records and source documents.
How it was build
Goal is to built a fully Azure-native AI chatbot for Shareflex Contracts and documents. The solution combines Azure OpenAI, Azure AI Search, vector embeddings, semantic search, and Retrieval Augmented Generation (RAG) technology to create an intelligent contract assistant capable of understanding natural language questions and retrieving highly relevant contract information within seconds.
Traditional full-text search is often not sufficient for complex contract environments. Users may search using different wording, abbreviations, incomplete phrases, or business language that does not exactly match the wording inside the documents. By using vector embeddings and semantic search, the AI chatbot understands the meaning and context of questions instead of relying purely on exact keyword matching.
The solution automatically processes SharePoint contract documents such as PDFs, Word files, Excel files, and other content stored inside Shareflex Contract Management. Azure AI Document Intelligence extracts the text and structure from the files, after which Azure OpenAI generates summaries, metadata, and vector embeddings. These embeddings are stored inside Azure AI Search, allowing the chatbot to perform intelligent similarity searches across all contracts and supporting documents.
The AI assistant can answer questions such as:
Which contracts contain NDA clauses?
Which supplier contracts have the highest penalties?
Show contracts related to cybersecurity incidents.
Which agreements are expiring soon?
Find contracts mentioning specific obligations, liabilities, or SLA clauses.
The chatbot runs directly inside a lightweight WordPress frontend connected to a custom PHP backend hosted on Azure infrastructure. The backend orchestrates embeddings, vector search, AI prompting, conversational memory, and source retrieval. Results include direct links back to SharePoint contract records and original source documents, allowing users to immediately open the correct contract or supporting file.
The architecture is highly scalable, fully cloud-native, and entirely based on Microsoft Azure technologies, including Azure OpenAI, Azure AI Search, Azure AI Foundry, Azure Storage, Microsoft Entra ID, Azure Key Vault, and managed identities for secure service-to-service communication.
This approach transforms traditional contract repositories into a modern AI-powered knowledge platform where users can interact with contracts using natural language instead of navigating folders, metadata filters, or complex search screens.
