Skip to main content

Add context and knowledge

Combine knowledge base documents, initial context, pre-call lookup data, and gathered results without mixing their responsibilities.
3 min read

Menace Voice has several ways to give an agent information. Choose based on ownership and freshness: documents for stable reference material, initial context for facts known about this run, a pre-call fetch or tool for live system data, and gathered context for structured values learned during the conversation.

Choose the source of truth#

  • Knowledge base: policies, menus, product reference, FAQs, and other documents the agent should quote or summarize.
  • Initial context: caller name, account ID, requested appointment, campaign fields, and other values available before the conversation begins.
  • Pre-call data fetch: an HTTP lookup that runs before the greeting and merges returned JSON into initial context.
  • Tool result: current availability, order state, balance, or any value that should be fetched at the moment it is needed.
  • Gathered context: typed fields extracted from the transcript, such as resolution, callback requested, or appointment preference.

Prepare knowledge base files#

Upload a PDF, Word document, text file, or JSON file up to 5 MB, then choose a retrieval mode. Full Document provides the complete extracted text and does not need an embedding model. Chunked Search splits and indexes larger material, so it requires an embedding configuration before processing and retrieval can succeed.

  • Use Full Document for a short menu, policy sheet, price list, or focused FAQ.
  • Use Chunked Search for a longer manual, policy collection, or contract where only a few sections are relevant to each question.
  • Give documents clear headings, short sections, and one primary topic; re-upload them when the source changes.
  • Wait for processing to complete, then attach the document to each Start Call or Agent node that should access it.
  • Attach selectively. A document uploaded to the workspace is not available to a node until you attach it.

Pass per-run context#

In an Agent prompt, reference initial-context fields directly, for example {{customer_name}} or {{account.plan}}. Use a pipe for a fallback such as {{customer_name | there}}. In a Webhook payload, include the object prefix: {{initial_context.customer_name}}.

Test context is not production context

Context variables saved in Agent Settings are used for Web Call and editor test calls. Production inbound calls and campaign calls use the actual telephony or contact data instead. Browser tests are inbound by default; set the test direction variable to outbound when that distinction affects the prompt.

Extract structured outcomes#

Enable extraction on an Agent or End Call node and define each result with a stable name, a string, number, or boolean type, and a precise instruction describing the evidence required. Menace Voice merges extracted values into gathered_context as the call progresses. If the transcript does not support a value, the agent should leave it empty rather than infer it.

Keep the data flow one-way

Agent prompts can read initial context, but they cannot read gathered_context. Send gathered values to a webhook or read them from the completed run. If the live conversation needs a current value, fetch it with a tool instead of relying on post-call extraction.

When your agent and data flow are stable, use Move from demo to production to choose the right traffic path and verification checklist.