Airgentic Help
Guided program search helps prospective students describe what they want to study in plain language, run a targeted EducationPlannerBC program search, and receive a clear summary of the results — without the assistant inventing programs or filters that are not in your search index.
The feature uses two specialist agents that work together:
| Agent | Role |
|---|---|
| Study Pathways Concierge | Talks with the user, asks minimal clarifiers, builds a search URL, and calls search_guided(). |
| Search Guide | Takes over automatically after the search runs and summarises the results for the user. |
The Concierge does not list or analyse search hits itself. Once the search completes, control passes to Search Guide for that step.
sequenceDiagram
participant User
participant Concierge as Study Pathways Concierge
participant Search as search_guided()
participant Guide as Search Guide
User->>Concierge: "I want a nursing diploma with co-op near Vancouver"
Concierge->>Concierge: Build /search/url/... path from Query Building rules
Concierge->>Search: search_guided(search_url)
Search->>Search: Fetch results JSON, normalise hits by count tier
Search->>Guide: Activate Search Guide agent
Guide->>User: Summarise, link, recommend, or suggest narrowing
At a high level:
/search/url/epbc/website?query=nursing&clive=programs&...) and calls the search_guided function.Search Guide does not run new searches. It summarises what was already retrieved.
The Concierge prompt (agent_study_pathways_concierge.prompt) focuses on conversation and URL construction, not result analysis.
Key behaviours:
query parameter; put institution, region, credential, study length, co-op, and similar constraints in facet parameters when they match supported values.The Concierge includes {{prompt:Query Building}} for URL rules and calls search_guided when it has enough information to build a path.
On the Configure Agents screen, the Concierge agent must have search_guided enabled under Functions for its prompt. It should not use the standard search() function for this workflow.
The Search Guide prompt (agent_search_guide.prompt) focuses on result presentation and next steps.
Key behaviours:
Search Guide also includes {{prompt:Query Building}} so it can build refined public search URLs when grouping or narrowing (for example linking to "3 diplomas at BCIT" with one extra facet added).
On the Configure Agents screen, Search Guide should have no search functions enabled. Its role description tells the Frontline agent when to delegate, but in normal operation it is activated automatically by search_guided() rather than by Frontline routing.
URL construction rules live in a shared Prompt Component called Query Building (sub_query_building.prompt in the global prompt library). Both agent prompts reference it with:
{{prompt:Query Building}}
Keeping URL rules in one component means:
The component covers:
| Topic | What it defines |
|---|---|
| URL formats | Internal path for search_guided vs public search.html link for users |
| Required parameters | clive=programs, num_ranks=100, and preferred defaults |
| Facet syntax | How institution, region, credential, study length, co-op, program type, and areas of study appear in the query string |
| Examples | Worked URL examples for common student scenarios |
| Refinement | How to add, change, or remove a single facet for narrowed public links |
| Zero-result recovery | The order in which to suggest broadening filters |
When editing URL behaviour, start in Edit Prompts → Prompt Components → Query Building. After changing the component, review both agent prompts in Admin Chat to confirm Concierge still builds correct paths and Search Guide still links to valid refined searches.
See Editing a Prompt for how substitutions work and Prompts Overview for the difference between Agent Prompts and Prompt Components.
search_guided is a customer function that wraps the platform's guided search pipeline. The LLM calls it with a fully constructed path-only search URL:
/search/url/{account}/{service}?query=...&clive=programs&...
Important details:
| Rule | Why it matters |
|---|---|
Path only — no https:// or host |
The platform prepends the correct backend host at runtime. |
| Account and service must match the session | Prevents cross-service search URLs from being injected. |
| Built before the call | The Concierge must construct the complete URL using Query Building rules; the function does not interpret natural language. |
When search_guided succeeds:
https://www.educationplannerbc.ca/search.html?... with the same query string).If the URL is invalid or the fetch fails, the error is returned to the Concierge agent and Search Guide is not activated — the Concierge can apologise, adjust the URL, or ask a clarifying question.
The function schema is defined in the global search_guided customer function. You do not need to write AirScript for EPBC unless you are adapting the pattern for another service.
Before Search Guide sees the results, the platform normalises them based on total hit count. This keeps tool messages appropriately sized and matches the tier rules in the Search Guide prompt.
| Total hits | What Search Guide receives |
|---|---|
| 0 | No result blocks — only hit count, search path, and public URL. |
| 1–5 | Every result with title, URL, description, page type, body, and metadata (institution, credential, study length, region, co-op, and so on). |
| 6–10 | Every result with metadata; body text truncated to 150 characters. |
| More than 10 | Up to 25 results with title, URL, description, page type, and metadata — no body text. |
Search Guide uses the total hit count from the tool message for its tier rules, not necessarily the number of Result [n] blocks shown (when more than 10 hits exist, fewer blocks may be shown than the total).
Search Guide adapts its reply based on how many programs matched. These tiers are defined in agent_search_guide.prompt.
Example tone: "Would you like to [remove the co-op requirement] or [broaden the location to all of BC]?"
Example tone: "Would you like to [filter to diplomas only] or [limit to Vancouver Region]?"
Search Guide uses two different link mechanisms. Mixing them up produces confusing UX.
| Mechanism | Use for | Example |
|---|---|---|
Markdown links [label](url) |
Public search page, individual program pages, refined search URLs | [view all 8 programs](https://www.educationplannerbc.ca/search.html?...) |
Square brackets [like this] |
Suggested user replies — recovery, narrowing, next-step choices | Would you like to [remove the co-op requirement]? |
Markdown links open pages. Square-bracket text is meant to be clicked as a chat reply so the user types less.
Search Guide must not use markdown links for recovery or narrowing phrases that are meant to be clicked as user replies.
Use this checklist when setting up or reviewing guided program search.
| Agent | Prompt file | Functions | Status |
|---|---|---|---|
| Study Pathways Concierge | agent_study_pathways_concierge |
search_guided only (not search) |
Testing first, then Live |
| Search Guide | agent_search_guide |
None | Live (activated by search_guided) |
Set each agent's Role so the Frontline agent knows when to delegate to the Concierge. Search Guide's role describes post-search summarisation; in practice it is usually reached via automatic handoff after search_guided.
See Editing an Agent and Creating an Agent.
| File | Type | Notes |
|---|---|---|
agent_study_pathways_concierge.prompt |
Agent Prompt | Conversation + URL building; includes {{prompt:Query Building}} |
agent_search_guide.prompt |
Agent Prompt | Tiered summarisation; includes {{prompt:Query Building}} |
sub_query_building.prompt |
Prompt Component (Query Building) | Shared URL rules for both agents |
Ensure the Frontline agent (or your service router) delegates study-pathway questions to Study Pathways Concierge. Typical triggers include program discovery, credential choice, and "what should I study" questions scoped to EducationPlannerBC programs.
Search Guide does not need separate Frontline routing for the happy path — search_guided() activates it directly.
Use Admin Chat and the Trace Log to verify the full flow before going live.
Suggested test scenarios:
| Scenario | What to verify |
|---|---|
| Clear intent, few filters | Concierge builds a URL quickly, calls search_guided, Search Guide summarises with program links. |
| Vague intent | Concierge asks one clarifier with clickable segments, then searches. |
| Zero results | Search Guide suggests square-bracket recovery options, not invented programs. |
| 6–10 results | Search Guide groups with refined markdown links. |
| Many results (>10) | Search Guide narrows rather than listing every program. |
| Invalid URL | Concierge receives an error; Search Guide is not activated. |
In the Trace Log, confirm:
search_guided is called with a path-only URL.Set Concierge status to Testing (Admin Chat) while iterating on prompts; switch to Live when satisfied.
| Area | Customisation |
|---|---|
| Concierge conversation style | Edit agent_study_pathways_concierge.prompt (tone, clarifier limits, intent templates) |
| Result presentation | Edit agent_search_guide.prompt (tier wording, recommendation logic, guardrails) |
| URL and facet rules | Edit Query Building component — affects both agents |
| Search index content | Site Search configuration, crawl, categories, and fields — see Site Search Overview |
| Public search page URL | Currently https://www.educationplannerbc.ca/search.html — contact Airgentic if this changes |
Search Guide guardrails explicitly prevent re-running search tools. If you need the assistant to run a new search after summarising, that requires a product change — the intended pattern is for the user to click a square-bracket suggestion or ask a follow-up, which routes back through the Concierge to call search_guided again with an updated URL.
search_guided call.search_guided may behave differently in voice/realtime sessions compared with text chat. Test voice separately if you offer it.