Skip to contentSkip to navigationSkip to topbar
On this page

Knowledge


The Knowledge feature in Twilio AI Assistants allows you to provide your Assistant with access to unstructured data sources, such as knowledge bases, company policies, documentation, and more. This enables the Assistant to pull relevant information during interactions, helping to answer customer questions with greater accuracy and context.

Unlike Tools, which are designed for specific tasks, Knowledge sources allow the Assistant to reference a broader range of content to provide more informed responses.


Configure Knowledge sources

configure-knowledge-sources page anchor

Configuring Knowledge sources for your AI Assistant involves configuring attributes that define how the Assistant uses the source.

The Knowledge you create is processed asynchronously. Once processing is complete, you'll see a completed status next to your Knowledge entry in the Console. The Assistant will then evaluate whether the Knowledge entry could be useful for answering a customer's question. This process is similar to how Tools are utilized, but instead of generating structured data for a Tool, the Assistant formulates a question and retrieves relevant information from the unstructured data you provided.

Knowledge attributes

knowledge-attributes page anchor
Attribute nameDescriptionExample
NameThe name of your knowledge source. It should be short and distinct and at least 5 characters.Shakespeare's Plays
DescriptionA short summary of the source data. Be clear and concise, so the Assistant knows exactly what types of information this source contains. This description is used by the Assistant to determine when to use this knowledge.The Complete Works of William Shakespeare. Use this to answer questions about any of Shakespeare's plays and whenever you reference a specific quote from the plays.
Data typeThe form of data you'll provide the Assistant. Supported options are: website, raw text, file upload, external vector database
[Website]
URL
A publicly-accessible URL containing helpful information for the Assistant.https://shakespeare.mit.edu/
[Website]
Page depth
Specifies the number of link levels deep the Assistant should crawl and import content from a website, with each level representing one additional click away from the starting page. The Assistant will crawl the site up to 3 levels deep, with a 500 page maximum during the developer preview. Ensure that all pages you want to include are within the specified domain.2
[Website]
Auto-Update
How often we should regularly re-import a live website.Never
[Raw text]
Manual text
Upload text directly, which the Assistant can reference during interactions.Shakespeare's Tragedies: Antony and Cleopatra, Coriolanus, Cymbeline, Hamlet, Julius Caesar, King Lear, Macbeth, Othello, Romeo and Juliet, Timon of Athens, Titus Andronicus, Troilus and Cressida
[File upload]
File
This file to import as knowledge available to the agent. We currently support the following file formats: .csv, .doc, .docx, .jsonl, .md, .mdx, .msg, .pdf, .ppt, .pptx, .tsv, .txt, .xlsx. Max file size is 16MB.example.pdf
[External vector database]
Provider
Integrate with your own vector database, currently only supporting Pinecone with a dimension of 1536 and the text-embedding-ada-002 embedding model. (More embedding models will be supported in the future)Pinecone
[External vector database]
Index
The name of the index in your external DB.'works-of-shakespeare'
Advanced Settings > Use response as final answerWhen checked, responses from this Knowledge source will be used as definitive answer and the Assistant will not use any other tools to create a response.[unchecked]

Manage your Knowledge base

manage-your-knowledge-base page anchor

Regularly update and organize your Knowledge sources to ensure the Assistant has access to the most accurate and relevant information. This includes adding new entries, updating existing ones, and removing outdated content.


If your Assistant isn't referencing Knowledge as expected

Try modifying your 'description' for the Knowledge source to be more specific about when to reference it. For example: "Use this Knowledge when the user asks ANY question about Shakespeare's plays."

If your Assistant is referencing the Knowledge source but Knowledge responds with 'I don't know'

You can 'View Details' of the indexed chunks of your Knowledge source from the additional actions menu on your list of Knowledge. This can help you determine whether your Knowledge source was indexed correctly. Additionally, from the same menu you can manually refresh your Knowledge source if it becomes outdated and wasn not set to auto-update.


To maximize the effectiveness of the Knowledge feature in your AI Assistant, consider the following best practices:

  1. Assess and optimize content: Regularly evaluate your existing Knowledge sources for accuracy, relevance, and coverage. Identify any gaps or outdated information that could hinder the Assistant's performance.
  2. Simplify and structure content: Ensure that the content is clear and concise. Use headings, bullet points, and metadata to make information straightforward to navigate for both the AI Assistant and your users.
  3. Prioritize high-impact content: Focus on updating and maintaining content that is frequently accessed or critical to customer interactions. Consider using analytics to determine which Knowledge entries are most valuable.

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.