This guide walks you through connecting Azure AI Search to a SharePoint site to create a knowledge base that stays automatically up to date as your documents change. Once set up, you can connect it to Knots Flow and use it as a knowledge source in your AI Node.
For more details you can also refer to this official Azure AI Search article.
Requirements to follow this guide:
- A SharePoint Online site where you store your knowledge documents
- An Azure deployment of the "text-embedding-3-large" model
Create an app to allow the indexer to connect to SharePoint:
- Go to https://portal.azure.com/#view/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/~/Overview
- Click "Add" > "App registration"
- Give it a name, select "Single tenant", leave the redirect URI empty, and click "Register"
- In your app go to "Manage" > "API permissions"
- Click "+ Add a permission" > Click "Microsoft Graph" > "Application permission"
- Pick "Sites.Read.All" and "Files.Read.All", or "Sites.Selected" for more granular access control
- Click "Add permissions" to confirm
- Click "Grant admin consent for [your tenant name]"
- In your app go to "Manage" > "Certificates & secrets"
- Navigate to the "Client secrets" tab, click "+ New client secret"
- Give it a description, pick an expiration date, and click "Add"
- Copy the "Value" of your secret, you will need it later and it won't be shown again
- In your app go to "Overview", copy "Application (client) ID" and "Directory (tenant) ID" for later
Create an AI search service:
- Go to AI Search https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/CognitiveSearch
- Click Create
- Give it a service name
- Select a location close to Germany for better performance
- Pick a pricing tier (At least "Basic")
- Review + Create, then create the search service
- Wait for the deployment to complete
- Click "Go to resource"
- Go to "Settings" > "Premium features" > Select the "Standard" plan
Create the AI knowledge source:
- Go to "Agentic retrieval" > Knowledge source
- Click "Add knowledge source"
- Select "Microsoft SharePoint (Indexed)"
- Fill in the name and description, select "Identity fields" for how to connect
- SharePoint endpoint is the URL of your SharePoint site
- Application ID is the Application (client) ID from the app you registered earlier
- Application secret is the client secret you copied earlier
- Tenant ID is the Directory (tenant) ID from the app you registered earlier
- "Container name" allows you to pick the default library, all libraries, or a specific set using a query (see details here: https://learn.microsoft.com/en-us/azure/search/search-how-to-index-sharepoint-online#query)
- "Mode": select "Standard" if your documents may include scanned pages, images, or tables
- In "Enable text vectorization" click "Add vectorizer"
- Select your text-embedding model (the one from the requirements) and click "Save"
- Click "Create"
By default the indexer runs once a day. To configure the re-indexing schedule:
- Go to "Agentic retrieval" > "Knowledge sources" > select your source > pick a schedule > click "Save"
Gather the credentials for your search service:
- Go to "Search management" > "Indexes" and copy the index name
- Go to "Settings" > "Keys" and create or copy a key from the "Manage query keys" table
- Go to "Overview" and copy the "Url" field
Create a connector with Knots
- Navigate to this url: https://app.knots.io/modules/connectors
- In the "Add new connector" section select the system Azure ai search
- Pick a connector name and fill the form as indicated in this screenshot
- The vector field name and content field name created when following this guide are snippet_vector and snippet
Comments
0 comments
Please sign in to leave a comment.