Reference sheet · all lessons
Glossary
One name per idea. When several words exist, the course picks one and lists the others as aliases to avoid.
tawk.to
- Widget
- The tawk.to chat UI loaded from
https://embed.tawk.to/{propertyId}/{widgetId}. Avoid: “plugin”, “chat box”. - Property
- A tawk.to site/workspace with its own settings, agents, widgets and add-ons. IDs: Administration → Overview.
- JavaScript API
window.Tawk_API: settings, methods and callbacks exposed by the widget in the browser. Avoid: “tawk SDK” (there is none).- Secure mode
- Identity verification for the widget: a server-side HMAC-SHA256 hash of the visitor identifier with the property’s JavaScript API key. Avoid: “login token”, “JWT”.
- Webhook
- A signed POST from tawk.to to your URL for one of four events; HMAC-SHA1 in
X-Tawk-Signature; retried for 12 hours with a stableX-Hook-Event-Id. - Direct Chat Link
https://tawk.to/chat/{propertyId}/{widgetId}, a standalone chat page that cannot be pre-filled.- AI Assist
- tawk.to’s paid AI add-on; its default bot persona is “Apollo”. Answers inside the widget from its own data sources. Avoid: “Apollo” as the product name.
- Data source (AI Assist)
- FAQs, text, documents, tables, shortcuts, Knowledge Base articles, websites; retrieval selects up to 5 chunks per inquiry.
- Instructions (AI Assist)
- The agent’s prompt, formerly “Base Prompt”. Where scope restrictions live in Pattern B.
- Knowledge Base
- tawk.to’s hosted help centre (
name.tawk.help); public published articles feed AI Assist and can appear as widget cards. - Shortcut
- A canned response (
/name) with optional files, forms, suggested messages and actions (tag, transfer). AI Assist can send one verbatim when its “AI Questions” match. - Trigger
- An automatic message based on conditions (up to 20 per property); Advanced triggers can match words in the visitor’s message.
- Escalation (AI Assist)
- Paid-plan setting that binds “asks for a human” and “no response found” to a shortcut with a Transfer Chat action.
This course’s own names
- Pattern A / B / C
- A: your bot is the front door, tawk.to is the human channel. B: AI Assist is the front door, your API is its tool. C: no bot.
- Handoff
- Moving a visitor from your bot to a human in tawk.to with identity and context attached. Avoid: “escalation” for this (reserved for AI Assist’s setting), “transfer”.
- Tier
- One stage of the answer pipeline: 0 human requested, 1 FAQ, 2 approved sources, 3 fallback.
- FAQ tier
- Deterministic matching of a visitor question to a curated entry; returns the canonical answer verbatim. Avoid: “intent matching”.
- Threshold / margin
- The FAQ tier’s two dials: minimum top score; minimum gap to the runner-up.
- Approved sources
- The one or two places answers may come from, expressed as an allow-list of hosts (optionally with a path prefix). Avoid: “whitelist”.
- Grounded
- A model answer with text and at least one citation into an allowed chunk. Anything else is a fallback.
- Sentinel
- The exact string
NOT_IN_SOURCESthe model returns when the documents do not answer; detected by code, not by reading prose. - Reason code
- The string on every
Answerthat explains the decision; your analytics key.
Retrieval and Claude
- Chunk
- A piece of a source document stored with its URL and title; the unit of retrieval and citation.
- Citation
- An API-returned pointer (
cited_text, document index, location) into adocumentblock that hadcitations: { enabled: true }. - Domain filter
allowed_domains/blocked_domainson Claude’s web search and web fetch tools; mutually exclusive; no scheme; subdomains included.- Prior-context rule
- Web fetch only fetches URLs that already appeared in the conversation (user messages, client tool results, earlier results), never URLs only in the system prompt.
- Prompt caching
- Reusing a stable prefix (
tools→system→messages) across requests viacache_control; verify withcache_read_input_tokens. - tf-idf cosine
- Lexical similarity that weights rare words more; bounded 0..1; the FAQ tier’s default.
- BM25
- The standard lexical ranking function (MiniSearch implements BM25+); the step up from tf-idf for larger FAQs.
- Embeddings
- Vectors for semantic similarity; Anthropic has no embedding model and recommends Voyage AI.
- Contextual retrieval
- Prepending a short document-aware context to each chunk before indexing; Anthropic measured large reductions in retrieval failure.
- Graph RAG
- “RAG, where the Retrieval path includes a knowledge graph.” Local search for entity-centred questions; global search for corpus-wide ones.
- Triple
- (subject, predicate, object) with provenance; the atom of the course’s graph prototype.
- Community report
- Microsoft GraphRAG’s LLM-written summary of a cluster of entities (found with hierarchical Leiden); the unit global search reads.
- Multi-hop question
- One that needs two or more facts joined across chunks; where graphs earn their keep.
Vercel and Android
- Vercel Function
- A serverless handler; this course uses the web-standard
export async function POST(request: Request)form. - Raw body
- The exact request bytes (
await request.text()), required for signature verification. - Idempotency key
- A delivery id stored so retries are ignored; for tawk.to,
X-Hook-Event-Id. - Shell (Android)
- What wraps your bot on a phone: a Trusted Web Activity, a Capacitor app, or a native Kotlin app.
- WebView chat screen
- The in-app page that loads the tawk.to widget, identifies the visitor, and bridges callbacks to native code.