# 04a — NASK: CreateOptimalSearchQuery

> **Release:** Zurich | **Flow:** Fulfiller Flow — Phase 2, Path A, Step 1 **Source:** [Now Assist Skill Kit — ServiceNow Community](https://www.servicenow.com/community/now-assist-articles/now-assist-skill-kit-tool-and-deployment-options/ta-p/3284803) | [Create a custom skill — ServiceNow Docs](https://www.servicenow.com/docs/bundle/zurich-intelligent-experiences/page/administer/now-assist-skill-kit/concept/now-assist-skill-kit-landing.html)

***

## What It Is

**Now Assist Skill Kit (NASK)** is the custom skill authoring tool built into the ServiceNow platform. It lets you build generative AI skills that are not available in the standard out-of-the-box Now Assist catalogue — combining LLM prompts with pre-processing tools (Flow Actions, Subflows, Retrievers, Scripts) into a single deployable unit.

Each NASK skill follows a four-step authoring workflow:

```
1. Edit prompt      → author the LLM prompt and skill inputs
2. Add tools        → attach pre-processing tools to augment context
3. Optimize         → test and evaluate prompt performance
4. Deploy           → configure workflow, product, and publish
```

This section covers building the **`CreateOptimalSearchQuery`** skill — the first skill to fire in the Fulfiller Flow (Path A, Step 1).

***

## Role in the Fulfiller Flow

![NASK CreateOptimalSearchQuery Flow Overview](/files/9eO9MKYB1Fc1yiZjIZDa)

> **Why this skill exists:** Raw error codes and messy incident case records make poor search queries. This skill transforms the structured incident data (error code, CI name, product, description) into an LLM-optimised query string that AI Search can rank meaningfully — improving KB retrieval quality significantly.

***

## Skill Architecture

The skill has two nodes on its canvas, executed in sequence:

| Node                          | Type         | Purpose                                                                                                                            |
| ----------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| `GetIncidentExtendDetail`     | Flow Action  | Pre-processing tool — reads all relevant fields from the Incident extend record and outputs them as structured data for the prompt |
| `GenerateOptimalPromptForRAG` | Skill Prompt | LLM prompt — takes the Flow Action outputs as context and generates an optimised AI Search query string                            |

The skill takes one input — `incidentextendrecord` (the Incident record identifier) — and outputs a query string ready for the AI Search retriever in the next step.

***

## Prerequisites

| Requirement                                                                                          | Detail                                                                                               |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Now LLM Service or Azure OpenAI (We are using Azure OpenAI to build this skill in this lab document) | LLM provider configured in the instance                                                              |
| `GetIncidentExtendDetail` Flow Action                                                                | Must exist — this is the Flow Action resource referenced by the tool                                 |
| Incident Extend table                                                                                | `x_snc_apacaienable_incident_extend` (or equivalent) — must be populated by the time the skill fires |

***

## Lab Exercise — Steps to Build

### Step 1: Navigate to Now Assist Skill Kit

Navigate to **All → Now Assist Skill Kit → Home** → click **Create skill**.

The **New skill** wizard opens on **General info**.

***

### Step 2: Configure General Info

Fill in the skill identity:

| Field           | Value                                                                                                           |
| --------------- | --------------------------------------------------------------------------------------------------------------- |
| **Skill name**  | `CreateOptimalSearchQuery`                                                                                      |
| **Description** | `This skill is created to generate the optimal search query for AI Search to be returned with the best results` |

> Skill names must use letters, numbers, dashes, and underscores only — no spaces or symbols.

**Choose default provider:**

The page presents a model picker. **Now LLM generic** is the recommended default (specialised in enterprise tasks, data analysis, and complex reasoning).

For this lab, the following provider is selected:

| Field                    | Value                                                          |
| ------------------------ | -------------------------------------------------------------- |
| **Default provider**     | `Azure OpenAI`                                                 |
| **Default provider API** | `Chat Completions`                                             |
| **Available models**     | gpt\_small, gpt-4-turbo, gpt-4o-mini, gpt-4o, gpt\_large, gpt4 |

![NASK — General Info: Skill Name, Description, and Provider](/files/TqwJkseEkTYcyy18j3Gf)

> The provider selection determines which LLM processes the prompt. Azure OpenAI is used here for its GPT model range. If your instance uses Now LLM Service natively, you have the option of selecting that instead as well — the skill logic is provider-agnostic.

***

### Step 3: Configure Security Controls

Scroll down on the General info page to reach **Configure security controls**.

**Define user access with an Access Control List (ACL):**

| Field           | Value          |
| --------------- | -------------- |
| **User access** | `Select roles` |
| **Roles**       | `itil`         |

**Apply role restrictions to skill:**

| Field     | Value                                           |
| --------- | ----------------------------------------------- |
| **Roles** | `itil, x_snc_apacaienable.incident_extend_user` |

![NASK — Security Controls: User Access and Role Restrictions](/files/Dhg9joizZ9v0J2MrbDc7)

> **User access** controls who can invoke this skill. **Role restrictions** set the maximum privilege level the skill can inherit when it executes — even if the invoking user has broader roles, the skill operates within limits.

Click **Continue** to proceed to prompt creation.

***

### Step 4: Start Prompt Creation and Add Skill Input

After clicking Continue from General info, the wizard advances to **Start prompt creation**.

![NASK — Start prompt creation](/files/8iio4FGjShYFfg3lPo3x)

Select **Write from scratch** (selected by default) and click **Next**.

> The three options are: **Write from scratch** (author your own prompt), **Choose one from library** (use a pre-built template), or **Use an AI-generated prompt** (let the platform generate a starting prompt). For this lab, write from scratch — the prompt is provided in the lab repository.

The wizard advances to **Add skill inputs**.

![NASK — Add skill inputs: empty state](/files/ZHtfCTQtJvEhWYVMmqVN)

Click **+ Add** to add the skill input.

Fill in the input details:

| Field                    | Value                               |
| ------------------------ | ----------------------------------- |
| **Datatype**             | `String`                            |
| **Name**                 | `incidentextendrecord`              |
| **Description**          | `record from incident extend table` |
| **Make input mandatory** | Unchecked                           |
| **Allow truncation**     | Unchecked                           |

![NASK — Add skill inputs: incidentextendrecord filled](/files/Z4g5BrtnoVX4HXpL1qZA)

![NASK — Skill Input: incidentextendrecord](/files/QNL7r3Qcx5b0iC4vgHqC)

> `incidentextendrecord` is the identifier passed in by the Fulfiller Flow when the skill is invoked. It references the Incident extend record that `GetIncidentExtendDetail` will query. This input is threaded through to the Flow Action tool as `{{incidentextendrecord}}`.
>
> The **Make input mandatory** checkbox is currently left unchecked. As you progressively firm up your AI Agent / Agentic Workflow build, it can eventually be turned on to ensure robustness — mandatory inputs ensure the flow does not run without the required context.

Click **Go to summary** → then **Skip To Prompt Editor** to open the full skill editor canvas.

***

### Step 5: Rename the Prompt

When the skill is created, NASK auto-generates a default prompt named **Incident Summarization**. This needs to be renamed to reflect the skill's actual purpose.

1. In the **Skill contents** panel (left side), expand **Prompts** → **Azure OpenAI** → **Chat Completions**
2. Click on **Incident Summarization** to select it

![NASK — Edit Prompt: Default Name (Incident Summarization)](/files/3tLi9W0E1k0Jz39UmAAw)

3. Click the **pencil icon** next to the prompt name to open the **Edit prompt name** dialog
4. Change the **Name** from `Incident Summarization` to `GenerateOptimalPromptForRAG`

![NASK — Edit Prompt Name Dialog](/files/Zit1A4gO9POM5pc0SemV)

5. Click **Save changes**
6. Confirm the prompt name now displays as **GenerateOptimalPromptForRAG** in the Skill contents panel

![NASK — Prompt Renamed to GenerateOptimalPromptForRAG](/files/jCBUhVA9vOz3FAXdz738)

> The prompt name is referenced throughout the skill — on the canvas (as the Skill prompt node label), in the Publish dialog, and in the finalized prompt selector. Renaming it now ensures consistency across all surfaces.

***

### Step 6: Add Tools — Canvas

After saving the skill input, navigate to the **Add tools** tab (Step 2 of the NASK wizard).

The canvas shows the execution flow: **Start → \[tool nodes] → End**. Click the **+** connector between Start and End to add a node.

Select **Tool node** and click **Add**.

![NASK — Add Node Dialog: Tool Node Selected](/files/FZog3vRwFq3asu2sNSbz)

The tool type picker appears.

Select **Flow Action** as the tool type and click **Configure tool**.

![NASK — Tool Type: Flow Action](/files/XCSYxQUWMSK7TIuvrSBa)

***

### Step 7: Configure the Flow Action Tool — General Info

The **Add flow action as a tool** wizard opens (5-step wizard: General info → Tool inputs → Tool outputs → Tool conditions → Summary).

**Step 1 — General info:**

| Field        | Value                                                      |
| ------------ | ---------------------------------------------------------- |
| **Name**     | `GetIncidentExtendDetail`                                  |
| **Resource** | `Retrieval of Relevant Fields from Incident Extract table` |

![NASK — Flow Action Tool: General Info](/files/AzkruPnF8uhgwhFnO9ZZ)

> The **Resource** field references the Flow Action that reads the Incident extend table. Ensure ACLs are correctly configured on this resource — the platform shows a warning: *"Ensure that Access Control Lists (ACLs) are correctly configured for the resource so that the skill can access it."*

Click **Continue**.

***

### Step 8: Configure the Flow Action Tool — Tool Inputs

**Step 2 — Tool inputs:**

| Field        | Value                      |
| ------------ | -------------------------- |
| **Name**     | `Incident Number`          |
| **Datatype** | `String`                   |
| **Value**    | `{{incidentextendrecord}}` |

![NASK — Flow Action Tool: Tool Inputs](/files/GeHNwGCkRRCgei2uqpvU)

> `{{incidentextendrecord}}` is the skill input defined in Step 4 — it is passed directly into the Flow Action here. This is how the runtime Incident record is threaded through the skill into the pre-processing tool.

Click **Continue**.

***

### Step 9: Configure the Flow Action Tool — Tool Outputs

**Step 3 — Tool outputs:**

The Flow Action returns the following outputs from the Incident extend table:

| Output field         | Type       | Used for                                  |
| -------------------- | ---------- | ----------------------------------------- |
| Action Status        | Object     | Execution status of the Flow Action       |
| Short Description    | String     | Incident short description                |
| Don't Treat as Error | True/False | Error handling flag                       |
| Description          | String     | Full incident description                 |
| Configuration Item   | String     | Affected CI name                          |
| Error Code           | String     | Extracted error code (from NADI)          |
| Product Bar Code     | String     | Device barcode                            |
| Product Name         | String     | Device product name                       |
| Serial Number        | String     | Device serial number                      |
| Category             | String     | Incident category                         |
| Work Notes           | String     | Diagnostic notes from the L1 conversation |

![NASK — Flow Action Tool: Tool Outputs](/files/MspOecEyOWr7fGrQzGHE)

> Leave all truncation unchecked unless you hit token limit issues in testing.

Click **Continue**.

***

### Step 10: Configure the Flow Action Tool — Tool Conditions

**Step 4 — Tool conditions (optional):**

| Field    | Value               |
| -------- | ------------------- |
| **Type** | `None (Always run)` |

![NASK — Flow Action Tool: Tool Conditions](/files/FYjlyA5rw2pZ618gfUws)

> **None (Always run)** means `GetIncidentExtendDetail` executes unconditionally every time the skill is invoked — correct here since the prompt always needs the Incident context.

Click **Continue** → review the Summary → click **Add tool**.

***

### Step 11: Review Tool Summary

**Step 5 — Summary:**

| Section         | Field           | Value                                                      |
| --------------- | --------------- | ---------------------------------------------------------- |
| Summary         | Type            | Flow Action                                                |
| General info    | Name            | `GetIncidentExtendDetail`                                  |
| General info    | Resource        | `Retrieval of Relevant Fields from Incident Extract table` |
| Inputs          | Incident Number | `{{incidentextendrecord}}`                                 |
| Outputs         | (all 11 fields) | String / Object / True/False as defined                    |
| Tool conditions | Type            | none                                                       |

![NASK — Flow Action Tool: Summary](/files/yf6dz5YTOeuPZhDjBfum)

Click **Add tool**.

***

### Step 12: Verify Canvas

After adding the tool, the canvas updates to show the full skill execution flow:

```
Start
  │
  ▼
GetIncidentExtendDetail   ← Flow Action (Tool node)
  │
  ▼
GenerateOptimalProm...    ← Skill Prompt node (auto-created)
  │
  ▼
End
```

![NASK — Canvas: Full Skill Flow](/files/rkrMqwKe4h7VEX4V5fhE)

> Navigate to **Step 1: Edit prompt** to author the prompt template — reference the Flow Action outputs using `{{GetIncidentExtendDetail.field_name}}` syntax.

***

### Step 13: Author the Prompt

Navigate back to **Step 1: Edit prompt** in the NASK wizard tab bar. Click on the **GenerateOptimalPromptForRAG** prompt in the Skill contents panel to open the prompt editor.

The prompt for this skill is provided in the lab repository. Copy the full prompt text from the following link listed in step 1 and paste it into the **Prompt** text area:

1. Open the file at [`../NASKprompts/CreateOptimalSearchQuery-Prompt`](https://raw.githubusercontent.com/raadlakha/AILab2.0/main/NASKprompts/CreateOptimalSearchQuery-Prompt) in the lab repository
2. Copy the **entire contents** of the file and read through the contents of the prompt. Remember that GenAI based systems are intelligent systems who adapt to their environment, and that every environment can differ. So read the prompt and see if there are things you want to include/exclude/modify from it to best suit the environment that you are building. Do not copy blindly!
3. In the NASK prompt editor, paste the copied text into the **Prompt** field
4. Verify that the prompt references the Flow Action output variables using `{{GetIncidentExtendDetail.<field_name>}}` syntax — for example:
   * `{{GetIncidentExtendDetail.short_description}}`
   * `{{GetIncidentExtendDetail.description}}`
   * `{{GetIncidentExtendDetail.configuration_item}}`
   * `{{GetIncidentExtendDetail.error_code}}`
   * `{{GetIncidentExtendDetail.product_bar_code}}`
   * `{{GetIncidentExtendDetail.product_name}}`
   * `{{GetIncidentExtendDetail.serial_number}}`
   * `{{GetIncidentExtendDetail.category}}`
   * `{{GetIncidentExtendDetail.work_notes}}`
5. Click **Save** to save the prompt

> **Prompt design note:** The prompt instructs the LLM to take the structured incident fields (error code, CI name, product details, work notes, description) and synthesise them into a single, keyword-optimised search query string suitable for AI Search. It is not a summarisation task — the output is a search query, not a summary. This distinction is critical for downstream KB retrieval quality.

***

### Step 14: Test the Prompt

Before publishing, use the built-in **Test prompt** feature to validate that the skill produces a correctly structured output. This confirms that the Flow Action retrieves the Incident data successfully and that the LLM generates a response following the template defined in your prompt.

1. In the NASK skill editor, locate the **Test prompt** panel (right-hand side of the prompt editor)
2. Click the **Run test** button — the **Run test** dialog opens
3. In the `incidentextendrecord` input field, enter an existing Incident Extend record number — for example: **`INCE0012002`**
4. Ensure **Test prompt after applying security controls** is checked — this validates that the skill's ACL configuration (`itil, x_snc_apacaienable.incident_extend_user` roler) allows the test to execute correctly
5. Click **Run test**

![NASK — Run Test Dialog: Input and Security Controls](/files/ln62idLdL1tU4tdIdvoC)

> **Which record to use?** Use any Incident Extend record that has been processed by NADI and has populated fields (error code, product name, CI, etc.). Records created during the L1 Agent testing (e.g., `INCE0012002`, `INCE0012003`) are ideal candidates. If you use a record with empty fields, the LLM will generate a sparse query with limited context — this is expected but not useful for validating prompt quality.

6. Wait for the test to complete — the **Response** tab in the Test prompt panel will display the LLM-generated output
7. Review the response and verify that it follows the **structured template** defined in the prompt. The output should contain the following sections in order:

| Section        | What It Should Contain                                                                                                      |
| -------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `ISSUE:`       | A concise summary of the problem combining the error code, product, and affected system                                     |
| `SYMPTOMS:`    | Observable symptoms from the short description and work notes — what the user reported seeing                               |
| `ERROR:`       | The specific error code and its context (e.g., `Status Code 84 — error code 84 encountered on Veritas NetBackup appliance`) |
| `SYSTEM:`      | The affected system — product name, model, and hostname/CI (e.g., `Veritas NetBackup Appliance 5240 (netbackup-server-01)`) |
| `CATEGORY:`    | The incident category and subcategory (e.g., `Hardware / Appliance Fault`)                                                  |
| `DESCRIPTION:` | A synthesised description combining all available context into a detailed narrative                                         |

![NASK — Test Prompt Response: Structured Output](/files/bTUIeqImFTdvVYhRBBN1)

> **What to verify (if your test outcome result is successful):**

| Check                 | Expected Behaviour                                                                                            |
| --------------------- | ------------------------------------------------------------------------------------------------------------- |
| Template adherence    | Response follows the `ISSUE → SYMPTOMS → ERROR → SYSTEM → CATEGORY → DESCRIPTION` structure                   |
| Field population      | Each section contains data derived from the Incident Extend record — not generic or hallucinated content      |
| Error code accuracy   | The `ERROR:` section reflects the actual `error_code` value from the record                                   |
| System identification | The `SYSTEM:` section includes the product name, model, and CI/hostname from the record                       |
| Query suitability     | The overall output reads as a structured search query — not a conversational summary or a narrative paragraph |

> **Why this template matters:** This structured output is what gets passed to the `RetrieveRelevantKBContent` skill in the next step of the Fulfiller Flow. AI Search performs significantly better when the query is organised into distinct facets (issue, error, system, category) rather than a single unstructured sentence.

8. If the response does not follow the template or contains missing/incorrect sections, return to the prompt editor (Step 13) and adjust the prompt instructions — then re-finalize and re-test

> **Tip:** You can also click the **Grounded prompt** tab to inspect the fully rendered prompt that was sent to the LLM — this shows the actual values substituted for each `{{GetIncidentExtendDetail.<field>}}` variable. The **Tools** tab shows the execution status of the `GetIncidentExtendDetail` Flow Action. Both are useful for debugging when the output does not match expectations.

9. Once the tests are completed successfully, click on **Lock Icon** → **Finalize prompt** to lock the prompt as version 2

![NASK — Finalize prompt dialog](/files/arqte5kWuVcKzJhGG9Jr)

> **Why finalize?** The prompt must be finalized before it can be selected in the Publish dialog (Step 16). Finalizing creates an immutable version — you can continue editing the draft and finalize again to create subsequent versions. Only finalized versions are available for publishing.
>
> Once finalized, you won't be able to edit this version of the prompt. You can always update and create a new version, or clone and create a new prompt.

***

### Step 15: Configure Deployment Settings

Navigate to **Step 4: Deployment and skill settings** → select **Deployment settings** from the left nav.

| Field        | Value                          |
| ------------ | ------------------------------ |
| **Workflow** | `Other`                        |
| **Product**  | (leave blank — not applicable) |

![NASK — Deployment Settings: Workflow](/files/VhdZaFrTxjkdp39dtgot)

> The **Workflow** field determines where this skill appears in the Now Assist Admin → Skills catalogue. Setting it to **Other** places the skill under the **Other** category — making it findable when activating it for use in Flow Designer.

***

### Step 16: Publish the Skill

Click **Publish skill** (top right of the skill editor).

The **Publish Skill** dialog opens:

| Field           | Value          |
| --------------- | -------------- |
| Workflow        | Other          |
| Product         | Not Applicable |
| Feature         | Not Applicable |
| Display Options | None           |

Under **Select which finalized prompts to include in the Published skill:**

| Provider     | Prompt                                              | Action  |
| ------------ | --------------------------------------------------- | ------- |
| Azure OpenAI | `GenerateOptimalPromptForRAG (v2)` — Default prompt | Checked |

![NASK — Publish Skill Dialog](/files/7xoBhCYXp27nMgpiUku9)

Click **Publish**.

> A prompt must be **finalized** before it can be selected here. If no finalized prompts appear, return to Step 1 (Edit prompt), complete the prompt, and click **Finalize prompt** before returning to publish.

***

### Step 17: Activate the Skill

After publishing, navigate to **All → Admin Center → Now Assist Admin → Now Assist Skills** tab.

Locate `CreateOptimalSearchQuery` under the **Other** workflow. Click **Turn on** → set role restrictions as required → confirm activation.

![Now Assist Admin — Skills: CreateOptimalSearchQuery](/files/0iq4lpkKiqoUhiUAf9cp)

> The skill must be **Active** in Now Assist Admin for it to be callable as a Flow Action from the Fulfiller Flow in Flow Designer. Publishing alone is not sufficient — activation is a separate step.

***

## Key Configuration Summary

| Field                   | Value                                                      |
| ----------------------- | ---------------------------------------------------------- |
| Skill name              | `CreateOptimalSearchQuery`                                 |
| Skill type              | Custom skill                                               |
| Default provider        | Azure OpenAI / Now LLM generic                             |
| Skill input             | `incidentextendrecord` (String)                            |
| Tool                    | `GetIncidentExtendDetail` — Flow Action                    |
| Tool resource           | `Retrieval of Relevant Fields from Incident Extract table` |
| Tool input              | `Incident Number` → `{{incidentextendrecord}}`             |
| Tool outputs            | 11 fields from Incident extend table                       |
| Tool condition          | None (Always run)                                          |
| Prompt                  | `GenerateOptimalPromptForRAG (v2)`                         |
| Workflow (deployment)   | Other                                                      |
| User access             | Select roles → `itil`                                      |
| Role restrictions       | `itil, x_snc_apacaienable.incident_extend_user`            |
| Status after activation | Active                                                     |

***

## Technical Notes

### Flow Action Outputs as Prompt Context

All 11 outputs from `GetIncidentExtendDetail` are available as template variables in the skill prompt using the syntax `{{GetIncidentExtendDetail.<output_name>}}`. The prompt uses these to construct a semantically rich query — combining the error code, CI name, product details, and work notes into a single optimised string that AI Search can rank accurately.

### Why "Retrieval of Relevant Fields from Incident Extract table"?

The standard Incident table does not contain the custom fields added by NADI (`error_code`, product barcode, serial number, etc.). The `GetIncidentExtendDetail` Flow Action reads from the **Incident extend table** (`x_snc_apacaienable_incident_extend`) which stores these enriched fields — giving the LLM the full device and error context it needs to generate a precise query.

### Tool Condition: None (Always run)

Tool conditions can be used to skip a tool based on a script evaluation or filter. For this skill, `None (Always run)` is correct: the Flow Action must always fire because the prompt has no fallback context without it.

### Finalize vs Publish

In NASK, prompts go through a two-stage lifecycle: **Finalize** locks the prompt version (creating v1, v2, etc.) and **Publish** deploys the skill with selected finalized prompts to the Now Assist ecosystem. You can have multiple finalized versions and choose which to publish. The published version is what runs in production.

### Structured Query Template

The `ISSUE → SYMPTOMS → ERROR → SYSTEM → CATEGORY → DESCRIPTION` template is designed to maximise AI Search retrieval quality. Each section maps to a distinct search facet: `ISSUE` provides the high-level problem statement, `ERROR` gives the exact error code for keyword matching, `SYSTEM` identifies the product and CI for filtering, and `CATEGORY` narrows the domain. When AI Search receives this structured query, it can match across multiple dimensions simultaneously — yielding more relevant KB results than a single unstructured sentence would.

***

## Reference

* [Now Assist Skill Kit — Tool and Deployment Options](https://www.servicenow.com/community/now-assist-articles/now-assist-skill-kit-tool-and-deployment-options/ta-p/3284803)
* [Now Assist Skill Kit FAQ](https://www.servicenow.com/community/now-assist-articles/now-assist-skill-kit-nask-faq/ta-p/3007953)
* [Creating a Custom Skill with NASK — Part 1](https://www.servicenow.com/community/developer-blog/creating-a-custom-skill-with-now-assist-skill-kit-part-1/ba-p/3448719)
* [Trigger a Custom Skill via Flow — Part 1](https://www.servicenow.com/community/developer-blog/trigger-a-custom-now-assist-skill-via-flow-part-1/ba-p/3453557)

***

## Next Steps

→ The published `CreateOptimalSearchQuery` skill outputs an optimised query string that feeds directly into the next step of the Fulfiller Flow.

→ Continue to the next section to configure the [04b - ResolutionFinderUsingInternalData](/sn-ai-lab/phase-2-fulfiller-flow/04b-now-assist-skill-kit-part2-resolutionfinderinternaldataskill.md) skill (Path A — Step 2), which takes this query and fetches ranked Knowledge Base results using the AI Search RAG retriever and PI.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sn-ai-platform.gitbook.io/sn-ai-lab/phase-2-fulfiller-flow/04a-now-assist-skill-kit-createoptimalsearchqueryskill.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
