๐Ÿ“„

Generative Answers on SharePoint List

Jul 8, 2024

Generative Answers on SharePoint List

Overview

  • Current Limitations: Native SharePoint integration for generative answers covers only SharePoint sites, not SharePoint lists.
  • No Direct API: No direct semantic search API for searching data within SharePoint lists.
  • Objective: Demonstrate three design patterns to search data in SharePoint lists using RESTful API.
  • Key Considerations:
    • Understand data structure in the source.
    • Define the desired outcome when using the bot for search.

Design Patterns Demonstrated

Scenario 1: Unique ID Searching

Example: Leave Request Application

  • Steps:
    • Employees provide a leave request ID to check status.
    • Use Power Automate flow to fetch data from SharePoint list based on ID.
    • Format and present response using generative answers.
  • Details:
    • In Power Automate, use 'Get Items' action to search for record by ID.
    • Format and pass data back to chatbot.
    • Use custom data sources for integration not available natively in copilot studio.

Scenario 2: Text-Based Column Searching

Example: FAQ Tracker

  • Challenges:
    • Power Automate doesn't support filtering multi-line text columns.
    • Target columns with unique identifiers and text-based data.
  • Steps:
    • Capture user's question and understand intent via prompt builder.
    • Use 'Get Items' action to search FAQ Tracker's 'Title' column.
    • Provide formatted response and link to record.
  • Details:
    • Use one-shot prompting with examples to extract required information.

Scenario 3: Multi-Line Text Column Searching

Example: Advanced Search Using Graph API

  • Objectives:
    • Search across any column, especially multi-line text, using Graph API.
  • Steps:
    • Understand the intent of userโ€™s question.
    • Use Graph API to search across SharePoint list.
    • Format and return summarized response.
  • Details:
    • Initialize necessary variables and format data for Graph API search.
    • Result limited to top three search hits presented back to co-pilot.

Important Points

  • Custom Data Sources: Used when the data source is not covered by native copilot integrations.
  • Optimizing Search: Focus on well-defined queries as custom data source limits results to top three hits.