Skip to content

πŸ” Lab 1: Environment Check + Coveo Discovery

Pattern: Coveo Direct API
Duration: 20 minutes
Objective: Confirm access, explore Coveo platform capabilities, and understand direct API integration benefits.

🎯 Lab Goals¢

By the end of this lab, you will:

  • βœ… Verify access to all workshop systems
  • βœ… Understand the Coveo platform architecture
  • βœ… Test search, passage retrieval, and answer APIs
  • βœ… Explore source attribution and relevance features
  • βœ… Identify when to use direct Coveo integration

πŸ—οΈ Architecture OverviewΒΆ

In this lab, you'll explore the Direct API Integration pattern:

graph TB subgraph "User Interface" UI[Search UI
React Application
App Runner] end subgraph "AWS Infrastructure" API[API Gateway
HTTP API] L1[Search Proxy
Lambda] L2[Passages Proxy
Lambda] L3[Answering Proxy
Lambda] end subgraph "Coveo Platform" SEARCH[Search API
Relevance + Results] PASSAGES[Passages API
Semantic Retrieval] ANSWER[Answer API
Generative AI] INDEX[Knowledge Index
14 Sources] end UI --> API API --> L1 API --> L2 API --> L3 L1 --> SEARCH L2 --> PASSAGES L3 --> ANSWER SEARCH --> INDEX PASSAGES --> INDEX ANSWER --> INDEX style UI fill:#e1f5fe style API fill:#f3e5f5 style INDEX fill:#e8f5e8

πŸ”„ Pattern 1 Sequence DiagramΒΆ

%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#e8f5e9','primaryTextColor':'#000','primaryBorderColor':'#4caf50','lineColor':'#4caf50','secondaryColor':'#fff3e0','tertiaryColor':'#e3f2fd'}}}%% sequenceDiagram participant User participant UI as Search UI participant API as API Gateway participant Lambda as Proxy Lambdas participant Coveo as Coveo APIs User->>+UI: Search Query UI->>+API: HTTP Request API->>+Lambda: Route to appropriate proxy Lambda->>+Coveo: API Call (Search/Passages/Answer) Coveo-->>-Lambda: Results with citations Lambda-->>-API: Formatted response API-->>-UI: JSON response UI-->>-User: Display results + sources Note over User,Coveo: Pattern 1: Direct API Integration Note over Lambda,Coveo: ~200ms response time

πŸ“‹ Lab ExercisesΒΆ

Exercise 1.1: Coveo Platform Overview (5 minutes)ΒΆ

Type: Instructor-led demonstration

Your instructor will demonstrate the Coveo platform setup. Follow along and take note of:

Coveo Console ComponentsΒΆ

πŸ“š Sources
14 authoritative knowledge sources
πŸ” Index
Processed and enriched content
🎯 Query Pipelines
Search logic and ML models
πŸ“Š Analytics
Usage patterns and performance
Coveo Sources in this Workshop (Indexed Content)
  • Wikipedia - General knowledge
  • Investor.gov - Investment guidance
  • IRS - Tax information
  • NCUA - Credit unions
  • FinCEN - Financial crimes
  • CFPB - Consumer protection
  • FDIC - Deposit insurance
  • FRB - Federal Reserve
  • OCC - Banking regulation
  • MyMoney.gov - Financial literacy
  • FTC - Trade commission

Coveo Console - Sources Overview

Coveo Console - Sources Overview

Coveo Console - Query Pipeline Configuration

Coveo Console - Query Pipeline Configuration


Exercise 1.2: Access the Workshop UI (3 minutes)ΒΆ

Type: Hands-on

  1. Open the App Runner URL provided by your instructor
  2. Login using the provided username and password for the UI (not AWS credentials!)

Workshop UI - Login Page

Workshop UI - Login Page

  1. Explore the interface:
    • Backend mode selector (top right)
    • Search bar (center)
    • Chatbot toggle (bottom right)
    • Results sections (answer, passages, search)

Workshop UI - Main Interface with Backend Selector

Workshop UI - Main Interface with Backend Selector

UI Navigation

The UI has three main sections: - Answer: AI-generated response with source citation - Passages: Relevant text excerpts for context - Search Results: Traditional search results


Exercise 1.3: Test Direct Coveo Integration (10 minutes)ΒΆ

Type: Hands-on

Workshop UI - Architecture with Coveo Backend Mode Selected

Workshop UI - Architecture with Coveo Backend Mode Selected

ObjectiveΒΆ

Test the Coveo Direct API integration with sample queries and explore all result sections.

Step-by-Step InstructionsΒΆ

Step 1: Verify Backend ModeΒΆ

  1. Look at the backend selector (top right)
  2. Ensure "Coveo" is selected
  3. Note the three options: Coveo, Bedrock Agent, Coveo MCP Server Agent

Workshop UI - Backend Mode Selector with Coveo Selected

Workshop UI - Backend Mode Selector with Coveo Selected

Step 2: Run Your First QueryΒΆ

  1. Click in the search bar
  2. Type or paste this sample query:

Query 1:

adjustable rate mortgage index margin

  1. Press Enter or click the search button

  2. Wait for results (should appear in 1-2 seconds)

Step 3: Explore Answer SectionΒΆ

Scroll down to see the AI Answer section:

Answer Section - AI-Generated Response

Answer Section - AI-Generated Response

What to observe:

πŸ’‘ Answer Section

  • βœ… Natural language explanation of your query
  • βœ… Comprehensive coverage of the topic
  • βœ… Source citations at the bottom
  • βœ… Clickable URLs to original sources

Click on a source citation: - Verify it opens the authoritative source - Note the URL domain (gov, official sites)

Step 4: Explore Passages SectionΒΆ

Scroll down to see the Relevant Passages section:

Passages Section - Relevant Text Excerpts

Passages Section - Relevant Text Excerpts

What to observe:

πŸ“ Passages Section

  • βœ… 3-5 relevant text excerpts
  • βœ… Quick View shows the indexed content
  • βœ… Source identification for each passage
  • βœ… Contextual snippets with surrounding text

Step 4: Explore Search Results SectionΒΆ

What to observe:

πŸ“Š Search Results

  • βœ… AI Answer by Coveo displayed
  • βœ… Top 5 Passages relevant to the query displayed
  • βœ… 10-20 search results displayed
  • βœ… Query terms highlighted in snippets
  • βœ… Source names visible (CFPB, IRS, etc.)
  • βœ… Clickable titles and URLs

Try clicking on a result: - Opens the original source in a new tab - Verify it's an authoritative government or financial site

Step 6: Test Additional QueriesΒΆ

Test the following queries one at a time, search and and observe the results

Query 2:

annual percentage rate

Query 3:

credit reports and scores dispute steps

Query 4:

retirement nest egg protection fraud prevention tip

Query 5:

capital gain and dividend reinvestment strategy

Step 7: Explore Facet FilteringΒΆ

  1. Look at the left sidebar (Facets)

  2. Note the available facets:

    • Project (source)
    • Document Type
  3. Click on a facet value (e.g., "CFPB" under Project)

Facets Sidebar - Filter Options

Facets Sidebar - Filter Options

  1. Observe: Results filtered to show only CFPB content
  2. Click "Clear Filters" to reset

ValidationΒΆ

  • Search returns results quickly (<2 seconds)
  • All three sections display (Answer, Passages, Search)
  • Source citations are clickable and valid
  • Facet filtering works correctly
  • Query terms are highlighted in results

πŸ” Key ObservationsΒΆ

Coveo Platform StrengthsΒΆ

πŸ“š Authoritative Sources

Content from 14 official government and financial institutions

πŸ€– AI-Powered Relevance

Machine learning models optimize result ranking

🎯 Semantic Understanding

Finds relevant content even with different terminology

πŸ”— Source Attribution

Every answer includes verifiable citations

πŸ“Š Multi-modal Results

Search results, AI answers, and contextual passages

Direct Integration BenefitsΒΆ

  1. Low Latency: Direct API calls minimize response time (~200ms)
  2. Full Control: Complete access to all API parameters
  3. Customization: Tailor search logic to specific use cases
  4. Cost Efficiency: Pay only for API usage
  5. Simple Architecture: Minimal infrastructure requirements

πŸ’‘ When to Use Direct IntegrationΒΆ

Ideal Use Cases for Coveo CustomersΒΆ

Best for: Use case where you need direct control over Coveo's search, passage retrieval, and answer APIs with finer control over the UI.

🏒 Knowledge Portals & Intranets

Scenario: Employee or customer self-service portals requiring fast, accurate search across your Coveo index

Why Direct API: Sub-second response times, full control over query parameters, faceted navigation

Coveo Features Used: Search API, Query Pipelines, ML Ranking, Facets

Example: Internal HR policy search, product documentation, knowledge base

πŸ”¬ Research & Discovery Applications

Scenario: Professional research tools requiring advanced filtering and precise relevance

Why Direct API: Access to all Coveo ML features, custom ranking, advanced query syntax

Coveo Features Used: Semantic search, Query expressions, Field-based filtering

Example: Legal research, medical literature search, competitive intelligence

πŸ“š Content Discovery & E-commerce

Scenario: Help users find relevant content/products quickly with faceted navigation

Why Direct API: Fast facet computation, personalized results, A/B testing support

Coveo Features Used: Dynamic facets, Recommendations, Query suggestions

Example: E-commerce product search, news aggregation, content portals

❓ FAQ & Support Automation

Scenario: Automated responses to common questions with authoritative source citations

Why Direct API: Answer API provides grounded responses, passage retrieval for context

Coveo Features Used: Answer API, Passage Retrieval, Source attribution

Example: Customer support FAQs, policy questions, troubleshooting guides

When NOT to Use Direct IntegrationΒΆ

❌ Multi-turn conversations: Use Bedrock Agent (Lab 2) or AgentCore (Lab 3) for conversational AI
❌ Complex tool orchestration: Use AgentCore with MCP (Lab 3) for multi-tool workflows
❌ Cross-session memory: Use Bedrock Agent or AgentCore with external memory
❌ Agent reasoning: Use Bedrock Agent or AgentCore for AI-driven decision making


πŸŽ‰ Lab 1 Complete!ΒΆ

You've successfully:

  • βœ… Verified access to the workshop environment
  • βœ… Explored Coveo's AI-powered search capabilities
  • βœ… Tested direct API integration with multiple query types
  • βœ… Understood when direct integration is the optimal choice

Key TakeawaysΒΆ

  1. Coveo provides enterprise-grade search with AI-powered relevance and source attribution
  2. Direct API integration offers simplicity and performance for straightforward use cases
  3. Authoritative sources ensure response accuracy and compliance
  4. Multiple result formats (search, answers, passages) serve different user needs

πŸš€ Next StepsΒΆ

Ready to add conversational AI capabilities to your search experience?

In Lab 2, you'll learn how to integrate Coveo with AWS Bedrock Agent for natural language conversations and multi-turn interactions.