Notes
๐ง Project Summary: Bulk Generative Search Tester for NICE CXone Expert
This is a local web-based tool built to rapidly test and evaluate LLM responses inside NICE CXone Expert. It supports persona management, bulk prompt testing, result visualization, and export — all from a clean UI.
๐ Folder & File Structure
▶ ๐ What Each File Does
▶ ๐ What Each File Does
✅ index.html
-
Defines the full UI layout.
-
Contains:
-
Persona Manager inputs
-
Accordion-style Question Configurator
-
Bulk test controls and results table
-
-
Includes buttons to add/import/export questions and profiles.
✅ script.js
-
Handles all frontend behavior:
-
Auto-resizing inputs
-
Event listeners for buttons
-
Fetching and loading persona profiles
-
Triggering
/bulk-completion
API for LLM responses -
Rendering completions + source links in a results table
-
Exporting to XLSX
-
Resetting test results
-
✅ styles.css
-
Uses CSS variables for consistent theme control (colors, spacing, font)
-
Styled for:
-
Rounded buttons and inputs
-
Responsive layout
-
Hover states, table formatting
-
Beautiful accordion and floating status message
-
✅ server.mjs
-
Express-based Node.js server
-
Provides secure backend endpoints:
-
GET /get-profile
→ fetch current CXone site profile -
POST /load-profile
→ push a new persona profile to CXone -
POST /bulk-completion
→ run multiple LLM completions in parallel
-
-
Handles HMAC signing using
config.json
credentials -
Uses XML parsing to extract
<completion>
and<page>
info
✅ rules.json
-
Contains optional default profiles used to pre-fill persona data
-
Format matches CXone Expert property names
✅ config.json
(local only – NOT shared)
-
Used only by the backend
-
NEVER exposed to frontend
▶ ๐งช How It Works (End-to-End)
▶ ๐งช How It Works (End-to-End)
-
Frontend (index.html + script.js):
-
User edits persona, adds test questions (with tags and path ancestors)
-
Clicks Run Tests → sends
/bulk-completion
request
-
-
Backend (server.mjs):
-
Authenticates with CXone using HMAC tokens
-
Calls CXone’s
/@api/deki/llm/completion
for each question -
Parses XML response to extract LLM response + sources
-
Returns structured JSON to the frontend
-
-
Frontend Displays:
-
Renders results table with completions and source page links
-
Allows multiple runs (Run 1, Run 2, etc.)
-
Export to Excel with persona profile + results
-
▶ ๐ ️ Outstanding Work & Enhancements
▶ ๐ ️ Outstanding Work & Enhancements
✅ Completed:
-
✅ Accordion-based UI for questions
-
✅ Floating toast messages
-
✅ Result table with source links
-
✅ XLSX export (including persona profile rows)
-
✅ "Reset Results" button
-
✅ Accordion arrow fix
-
✅ Apply-to-All for Tags/Paths
-
✅ Fully themed UI with color variables
๐ง Outstanding / Possible Enhancements:
-
๐ Undo or Confirm Reset
-
✨ Auto-expand textarea as user types
-
๐จ Dark Mode toggle
-
๐ Filter/sort result rows
-
๐ LLM diff highlighter across runs
-
๐ Save/load question sets to file
-
๐ง Agent-based persona testing (future)
๐งช Setup Instructions (Install on New Machine)
1. Copy files to folder
2. Install Node.js (if not already)
Download from: https://nodejs.org/en
Terminal>
cd "C:\Users\shannonn\OneDrive - Nice Systems Ltd\Documents\OtherWorkItems\BulkExpertAITester"
npm init -y
npm install express cors xml2js node-fetch
3. Create your own config.json
In the root folder, add:
{
"expertUrl": "https://your-instance.mindtouch.us",
"apiKey": "your-api-key",
"apiSecret": "your-api-secret"
}