AI Builder의 Grounded Prompts를 사용한 Dataverse 쿼리

발행: (2026년 2월 9일 오후 04:03 GMT+9)
8 분 소요
원문: Dev.to

Source: Dev.to

Querying Dataverse Using AI Builder’s Grounded Prompts에 대한 표지 이미지

Bala Madhusoodhanan


Intro

Power Platform의 최신 업데이트로 AI Builder 프롬프트를 이제 grounded—Dataverse 테이블에 직접 연결할 수 있게 되었습니다. 이는 비즈니스 데이터에서 인사이트를 추출하고, 요약하며, 자동화하는 방식을 혁신합니다. 이 가이드에서는 Dataverse를 쿼리하기 위해 grounded AI 프롬프트를 만들고 사용하는 방법을 단계별로 안내합니다.

AI Builder Prompt

이 프롬프트는 시맨틱 검색 및 요약 에이전트로 설계되었습니다.

  • 사용자의 자유 텍스트 질의와 마크다운 테이블 형태의 지식‑베이스 기사들을 입력으로 받습니다.
  • 데이터를 정리하고 정규화합니다(HTML 제거, 중복 열 처리 등).
  • 투명한 규칙 기반 관련성 점수 시스템을 적용합니다.
  • 신뢰도 점수가 높은 기사(≥ 0.80)만 반환합니다.

각 반환된 기사에는 간결한 일반 텍스트 답변, ServiceNow 링크, 그리고 신뢰도 점수가 포함됩니다. 출력은 엄격히 포맷된 JSON 배열이며, 최종 배열 외에 추가 텍스트, 설명, 마크다운은 포함되지 않습니다.

{
  "Agent": {
    "Name": "DVSearch",
    "Role": "Semantic Search & Summarization Agent",
    "Function": "Identify relevant KB articles, extract concise plain‑text answers, output high‑confidence results as JSON."
  },
  "Objective": {
    "Description": "Return a JSON array of relevant KB articles addressing user_query.",
    "ConfidenceThreshold": ">= 0.80"
  },
  "Inputs": {
    "userQuery": {
      "Type": "string",
      "Description": "Free‑text question (e.g., \"What is the fix for the product receipt posting error\")."
    },
    "SnowToonFile": {
      "Type": "string",
      "Format": "Markdown Table",
      "Properties": [
        "May have extra wrappers (##, ££).",
        "May have duplicate headers ('Article content').",
        "May contain HTML‑heavy content."
      ]
    }
  },
  "Output": {
    "Format": "JSON Array",
    "Schema": {
      "ServiceNowLink": "string",
      "answer": "string",
      "confidence_score": "float [0.80‑1.00], 2 decimals"
    },
    "EmptyArrayCondition": "If no articles meet >= 0.80 threshold, output: []",
    "StrictRule": "No text, explanations, or markdown outside the final JSON array."
  },
  "ProcessingSteps": [
    {
      "Step": "1. Parse & Preprocess Table",
      "Actions": [
        "Ignore leading/trailing non‑table markers (##, ££).",
        "Identify header: first pipe‑delimited row + delimiter (|---|).",
        "Normalize headers: trim, lowercase, collapse spaces.",
        "Map columns: 'article title' → `article_title`, 'servicenowlink' → `service_now_link`.",
        "Map 'article content' → `article_content`: use the last non‑empty cell; if multiple non‑empty, use the longest.",
        "Normalize cell text: trim, collapse spaces, decode common HTML entities (e.g., > → >, " → \").",
        "Strip HTML from `article_content` completely: remove all tags, data URIs, image‑only content, and convert lists to plain sentences."
      ]
    },
    {
      "Step": "2. Understand Query",
      "Actions": [
        "Lowercase and trim `user_query`.",
        "Identify key entities/phrases.",
        "Treat 'fix', 'solution', 'resolution', 'how to', 'steps', 'resolve', 'action' as equivalent intents.",
        "For generic queries, match articles whose title/content clearly address that family."
      ]
    },
    {
      "Step": "3. Relevance Scoring (0.00‑1.00, 2 decimals)",
      "Components": {
        "TitleRelevance": {
          "Max": "+0.70",
          "Rules": [
            "+0.40 if title contains main error/entity (or close paraphrase).",
            "+0.30 if title includes most key query terms (non‑stopwords) or exact error string."
          ]
        },
        "ContentRelevance": {
          "Max": "+0.30",
          "Rules": [
            "+0.15 if content provides clear root cause/diagnosis.",
            "+0.15 if content provides concrete, actionable steps (e.g., \"update X\")."
          ]
        },
        "Penalties": [
          "-0.10 if article is about a different process/module despite keyword overlap.",
          "-0.05 if it mentions the topic but lacks actionable steps/resolution."
        ]
      },
      "FinalAdjustment": "Clamp score to [0.00, 1.00]."
    },
    {
      "Step": "4. Threshold Filter",
      "Actions": [
        "Discard any article with `confidence_score` < 0.80."
      ]
    },

{ “Step”: “5. Synthesize Answer (for kept articles)”, “Actions”: [ “Create a 1‑3 sentence plain‑text answer, directly addressing user_query using only cleaned text.”, “Prefer “root cause + essential steps”.”, “Avoid UI fluff, screenshots, irrelevant labels, raw links, base64, or image references.” ] }


### Expected Inputs

1. **user_query** – a string containing the user's question.  
2. **knowledge_base_articles** – a markdown table (file) where each row represents a separate knowledge‑base article. The key columns are **Article title**, **Article content** (may contain HTML), and **ServiceNowLink**.

```json
{
  "Steps": [
    {
      "Step": "1. Parse Input",
      "Actions": [
        "Read user query string.",
        "Read knowledge base markdown table."
      ]
    },
    {
      "Step": "2. Normalize Data",
      "Actions": [
        "Strip HTML tags from all cells.",
        "Decode HTML entities.",
        "Trim whitespace.",
        "Map column names to canonical schema (e.g., `Article Title` → `title`)."
      ]
    },
    {
      "Step": "3. Filter Rows",
      "Actions": [
        "Drop rows missing required fields (`ServiceNowLink`, `Article content`).",
        "Ignore rows where `Article content` is empty or only whitespace."
      ]
    },
    {
      "Step": "4. Score Relevance",
      "Actions": [
        "Compute deterministic similarity between query and article title/content.",
        "Score range: 0.00 – 1.00.",
        "Apply threshold: keep rows with `confidence_score` ≥ 0.80."
      ]
    },
    {
      "Step": "5. Synthesize Answer",
      "Actions": [
        "Generate 1‑3 sentence plain‑text answer.",
        "Include root cause and actionable steps.",
        "Must be plain text (no HTML)."
      ]
    },
    {
      "Step": "6. Construct Final Results",
      "Actions": [
        "Create JSON object per kept article (as per Schema).",
        "Skip article if `ServiceNowLink` is missing.",
        "Sort final array by `confidence_score` descending. Tie‑breaker: more specific title match to query."
      ]
    },
    {
      "Step": "7. Final Output",
      "Actions": [
        "Output only the JSON array. No extra text."
      ]
    }
  ],
  "EdgeCases": [
    "Duplicate 'Article content' columns: Use last non‑empty; if multiple non‑empty, use longest.",
    "Empty content/strong title: \"Score usually < 0.80 if no concrete steps/root cause.\"",
    "No qualifying results: Return [].",
    "Language: Same as content; default English for mixed cases.",
    "Robustness: Ignore images/base64 blocks entirely; no influence on score."
  ]
}

기능

설명

입력

  • 사용자 질의 (문자열)
  • 지식 베이스 (Markdown 표)

출력

  • JSON 배열 (ServiceNowLink, answer, confidence_score)

데이터 정규화

  • HTML 제거, 열 매핑, 엔티티 디코딩, 중복 처리

점수 매기기

  • 결정론적, 규칙 기반, 0.00–1.00, 임계값 0.80

답변 합성

  • 1‑3 문장, 근본 원인 및 단계, 순수 텍스트만

견고성

  • 래퍼, 중복, 빈 콘텐츠, 이미지, 혼합 언어 처리

결정성

  • 명시적 단계, 엄격히 정의된 출력, 동점 해결 규칙

보안 / 모범 사례

  • 추가 텍스트, 설명, 마크다운 없음; 링크가 없는 기사 건너뛰기

사용성

  • Power Platform/AI Builder 및 흐름과의 통합을 위해 설계됨

Image

왜 중요한가

  • 프롬프트에서 직접 Dataverse 테이블 조회
  • 실시간 비즈니스 데이터 추출, 요약 및 제공
  • 앱 및 흐름에 지능형 자동화 통합

최종 생각

이 기능을 통해 Power Platform에서 스마트하고 데이터 기반 솔루션을 구축하는 것이 그 어느 때보다 쉬워집니다. AI Builder의 근거 기반 프롬프트는 AI 워크플로를 실시간 Dataverse 데이터와 연결하는 과정을 단순화합니다. 제안서를 요약하든, 주문 상태를 확인하든, 지식 기사를 찾아내든, 이 기능은 Power Platform 솔루션에 보다 스마트하고 역동적인 자동화를 제공합니다.

0 조회
Back to Blog

관련 글

더 보기 »

노트북 GPU의 숨겨진 힘을 풀어내기

개요 대부분의 최신 노트북은 강력한 GPU를 탑재하고 있지만, 이를 충분히 활용하지 못하는 경우가 많습니다. 소프트웨어 엔지니어로서 로컬 LLM을 실행하든, 데이터 사이언티스트이든...