Skip to content

Content Library Demo Script ​

Six demos. Fourteen minutes. Curated knowledge with grants, hybrid search, and a full audit trail.

This script walks through GhostAI Content Library — the org-scoped document hub where teams publish Markdown, PDFs, Office files, code, email archives, and more. Access is never “everyone sees everything”: it is grant-based by category or individual item, with templates for common personas, hybrid search (BM25 plus semantic with reciprocal rank fusion), versioning with diffs, and compliance-ready logging.


Pre-Demo Checklist ​

  • [ ] GhostAI instance is running and reachable
  • [ ] Content Library is enabled for the org (billing tier includes Content Library: Team, Business, or Enterprise)
  • [ ] Demo user has content_library:read at minimum; a second account (or admin) has content_library:manage and content_library:audit for grants, uploads, and audit views
  • [ ] Browser open to GhostAI; Content Library is visible in navigation (or open the library route directly if your build exposes it)
  • [ ] At least one category contains sample items, or plan to upload during Demo 2
  • [ ] For semantic search in Demo 5–6: embeddings configured (local Sentence Transformers or Bedrock per content_library_embedding_backend) so chunk embeddings exist after indexing
  • [ ] Optional: second browser profile or incognito window logged in as a user with narrow grants to contrast access in Demo 3

Quick access check ​

bash
curl -s -H "Authorization: Bearer $GHOSTAI_API_KEY" \
  "https://your-host/api/content-library/access-check" | python3 -m json.tool

Expect "has_access": true for users who have both RBAC read permission and at least one active grant (or platform admin).

Supported file types (talk track) ​

The library indexes and surfaces many formats with distinct icons in the UI: Markdown, PDF, HTML, code (e.g. .py, .ts, .go), plain text, YAML, CSV / JSON, images, Office (.docx, .xlsx, .pptx), and email (.eml, .msg).


The Scenario ​

Northwind Analytics runs a centralized knowledge hub: playbooks live next to legal templates, sales decks, and engineering runbooks. Only people with the right grants see restricted categories (for example investor or pricing). New hires request access; managers approve or deny. Everything is audited, versioned, and searchable — including from chat when a document is attached.


Demo 1: Browse the Library ​

Duration: 2 minutes
Story: Show how users discover content the way they think — by category, drill-down, search, and recommendations.

Steps ​

  1. Open Content Library from the main navigation.
  2. Walk the category list (e.g. Engineering, Legal, Marketing, Sales, Product). Expand a category and show subcategories where present.
  3. Use the search box: try a keyword that appears inside a document body, not only in the title — call out that results can come from chunked content.
  4. Scroll to Recommended (or “For you”) and explain that signals such as profile affinity, recent views, and bookmarks influence ranking.
  5. Point at file type icons on rows or cards so the audience maps MIME/extension families to visual cues (PDF vs Markdown vs Office vs email).

Expected output ​

  • Category and subcategory navigation loads without empty errors for granted content.
  • Search returns relevant rows with snippets.
  • Recommended section shows personalized or org-popular items.
  • Icons reflect file families listed in the checklist.

Talking points ​

"This isn’t a flat folder dump. Categories mirror how your business thinks about knowledge, and subcategories keep large libraries navigable."

"Search is hybrid: lexical chunk matching plus optional semantic retrieval. When embeddings are on, the system reciprocal rank fuses BM25-style signals with vector similarity so paraphrases still surface the right doc."

"Recommendations close the gap between ‘we have a library’ and ‘people actually use it.’"


Demo 2: Upload and Version ​

Duration: 3 minutes
Story: Publish a living document, rev it, and prove change control with a diff.

Steps ​

  1. As a user with content_library:manage (upload endpoints are gated accordingly), choose Upload (or equivalent).
  2. Upload a small Markdown or text file (e.g. northwind-api-runbook.md) into category engineering or uploads. Confirm title and metadata if the UI prompts.
  3. Open the item’s version history. Show version 1 metadata (timestamp, size, checksum conceptually).
  4. Edit the file locally (add a section, change a parameter), then upload a new version for the same item.
  5. Open Compare versions / diff view and select from version 1 to version 2. Walk the unified diff.

Expected output ​

  • First upload creates version 1 and indexes text for search.
  • Second upload increments current_version; history lists both.
  • Diff shows added/removed lines (has_changes: true when content diverges).

Talking points ​

"Versioning is first-class. Compliance and SRE teams get an objective record of what changed, not a screenshot in Slack."

"Text is extracted, chunked, and embedded for search; binaries stay downloadable under your org’s storage rules."

"Organization storage is capped at 10 GiB by default — enough for serious documentation without turning the library into a raw data lake."


Demo 3: Grant-Based Access ​

Duration: 2 minutes
Story: Show least-privilege access: category-wide, single-item, org-wide category expansion, templates, and bulk assignment.

Concepts (on screen or whiteboard) ​

ConceptMeaning
Grant typescategory — access to everything in a category; item — access to one document by item ID.
grant_valueFor category, a category key (e.g. legal) or __all__ to expand into grants for every known category in one action. For item, the item’s UUID.
TemplatesNamed bundles: engineering, leadership, marketing, sales, legal, all — each maps to a curated list of categories (see API /api/content-library/grant-templates).
Bulk grantPOST /api/content-library/grants/bulk with user_ids plus either template_name or explicit categories.

Steps ​

  1. Open Grants / Access management (requires content_library:manage).
  2. Create a category grant for a test user (e.g. marketing only).
  3. Show grant templates — pick sales or engineering and explain which categories it unlocks.
  4. Run a bulk grant to three users using the marketing template (or template_name: "all" for a sandbox-only demo).
  5. Optionally log in as the narrow-grant user in another window: library hides non-granted categories.

Expected output ​

  • Individual POST /api/content-library/grants succeeds with user_id, grant_type, grant_value.
  • Template list matches backend definitions.
  • Bulk response reports created and skipped duplicates.

Talking points ​

"RBAC gets you in the building: content_library:read, content_library:upload, content_library:manage, content_library:audit. Grants decide which shelves you can read."

"__all__ is the fast path for ‘full library reader’ without clicking twenty categories — still logged in audit."


Demo 4: Collections and Bookmarks ​

Duration: 2 minutes
Story: Personal and team curation without copying files.

Steps ​

  1. Create a collection (e.g. “Q1 Launch Kit”) from the collections UI.
  2. Add items from search or category browse (multi-select if available).
  3. Bookmark two items; open the Bookmarks view and confirm they appear.
  4. Return to Recommended and note how bookmarks and recent views sharpen suggestions.

Expected output ​

  • Collection appears in My collections with listed members.
  • Bookmark toggle persists; /api/content-library/bookmarks reflects state.
  • Recommendations feel relevant after engagement.

Talking points ​

"Collections are pointers, not duplicates — one canonical file, many curated lenses."

"Bookmarks are the fastest way to build a personal short list; they also feed the recommendation model."


Demo 5: Chat with Documents ​

Duration: 2 minutes
Story: Ground the model on approved library content only.

Steps ​

  1. Start (or reuse) a chat thread.
  2. Use Attach from Content Library (or the paperclip → library picker).
  3. Select an item the user can access; send a question that is answered only in the body of that file (proves retrieval, not memory).
  4. Run a library search from the library UI with a paraphrase of the same question; point out overlap between chat grounding and semantic search hits.
  5. Mention feedback: users can submit a type (e.g. helpful, outdated, inaccurate) plus optional comment; auditors review via feedback APIs.

Expected output ​

  • Assistant cites or reflects content from the attached item.
  • Library search returns the same item with a non-zero hybrid score when embeddings are enabled.

Talking points ​

"The same chunk index that powers search powers chat attachments — one ingestion pipeline, two surfaces."

"If someone needs access they do not have, they file an access request; admins approve or deny from the queue — grants are created on approval."


Demo 6: Audit Trail ​

Duration: 2 minutes
Story: Close with governance — exports, stale content, and analytics.

Steps ​

  1. Open Content Library audit (requires content_library:audit).
  2. Filter by action (e.g. view, search, upload, download_pdf) and show columns: timestamp, user, action, document, IP, detail.
  3. Click Export CSV (or call /api/content-library/audit/export) and open the file — headers: Timestamp, User, Action, Document, Document Path, IP, Detail.
  4. Open Stale content / Reports: show items past N days without meaningful refresh (default threshold often 90 days — configurable in API via days query param).
  5. Open Analytics dashboard: most_viewed, popular_categories, active_users_30d, search_gaps (queries that returned zero results), least_viewed.

Expected output ​

  • Audit lists recent actions consistent with demos 1–5.
  • CSV downloads and opens in Excel or Numbers.
  • Stale list and analytics JSON support a compliance narrative.

Talking points ​

"Every meaningful action hits content_library_audit — downloads, searches, grants, uploads, bookmarks."

"Search gaps tell content ops exactly which questions the library failed to answer; stale detection flags policy docs that have not been reviewed."


Recovery Steps ​

has_access: false on /api/content-library/access-check ​

  1. Confirm the user’s role includes content_library:read (Admin → members / RBAC).
  2. Create at least one grant: category or item, or use grant_type: "category" with grant_value: "__all__" for demos.
  3. Re-run the access-check curl.

403 on upload or version replace ​

Upload and replace require content_library:manage on the router. Grant the demo account manage (or use an admin token). The distinct content_library:upload permission exists in RBAC for roles that separate upload from full management.

403 on audit, analytics, or stale endpoints ​

Assign content_library:audit to the presenter account or switch to an auditor user.

Search returns no results ​

  1. Confirm items finished indexing (chunks exist after upload or scan).
  2. For semantic paths, verify embedding backend credentials and PostgreSQL pgvector (or SQLite fallback) is healthy.
  3. Try a shorter keyword that appears literally in extracted text to validate BM25 path.

Semantic scores absent (BM25-only behavior) ​

Embeddings may be off or failed silently. Check backend logs for chunk embedding errors; verify content_library_embedding_backend and model settings.

Quota errors on upload ​

Organization total exceeds 10 GiB (quota_bytes in /api/content-library/quota). Delete unused items or raise quota in product policy (if your deployment allows).

External source sync errors ​

Sources use source_type (filesystem, s3, upload) and encrypted config. Filesystem sync requires a valid path on the server. Fix the path and call POST /api/content-library/sources/{source_id}/sync.

Grant template name rejected ​

Use exactly: engineering, leadership, marketing, sales, legal, all (see /api/content-library/grant-templates).


Demo Flow Cheat Sheet ​

#DemoDurationAPI / UI focusKey moment
1Browse the Library2 min/categories, /subcategories, /items, /recommendedIcons + hybrid search story
2Upload and Version3 min/items/upload, /items/{id}/versions, /items/{id}/diffUnified diff across versions
3Grant-Based Access2 min/grants, /grants/bulk, /grant-templatesTemplates + __all__
4Collections and Bookmarks2 min/collections, /bookmarksCurated views without copies
5Chat with Documents2 minChat attachment + /searchSame index for chat and search
6Audit Trail2 min/audit, /audit/export, /stale, /analyticsCSV + search gaps
Total~13 min

Frequently Asked Questions (From Demos) ​

"How is this different from SharePoint or Google Drive?"

Those are general file stores. Content Library is grant-scoped to the AI workspace, with chunk-level search, chat grounding, version diffs, access requests, and an audit trail designed for models and compliance — not just folder ACLs.

"What does hybrid search mean in practice?"

Chunk text is scored with a BM25-style ranking; when embeddings exist, semantic neighbors are ranked separately and merged with reciprocal rank fusion (RRF) so keyword and meaning both matter.

"Can we sync from our own bucket or file server?"

Yes. Admins register external sources with source_type and config, then trigger sync. Filesystem sync walks a configured path; other source types follow your deployment’s integration maturity.

"What is the storage limit?"

Default 10 GiB per organization for library binary storage; /api/content-library/quota returns usage and quota_bytes.

"Who can see audit logs and analytics?"

Users with content_library:audit. Managers with only read cannot export CSV.

"How do feedback and access requests work?"

Readers submit feedback with a type and optional comment; auditors list it via /api/content-library/feedback. Access requests are created by readers for a category or item; PATCH /api/content-library/access-requests/{id} with approved or denied completes the workflow and materializes grants on approval.

"Is platform scan the same as tenant upload?"

POST /api/content-library/scan is platform admin only for bulk indexing. Day-to-day ingestion is per-org upload or source sync.


For hands-on API exercises with curl, see the Content Library Full Lab.

SOC 2 Type II Certified | BAA Available | HIPAA-Ready