Library
This feature allows your agent to retrieve contextual information from a knowledge base (called a Library) during live conversations. It’s typically used to:
-
Answer complex or policy-driven queries by referencing internal documents.
-
Reduce hallucinations by grounding responses in verified company knowledge.
This enables your agent to handle a wider range of queries confidently, without relying solely on training data or pre-scripted responses.
Create and manage library
-
Navigate →
Library → Create Libraryfrom the main menu. -
Click + Add Document and:
-
Upload a PDF (e.g., SOP, Policy Doc, Product Manual), or
-
Create a new document using the built-in editor.
-
-
Name your document clearly (e.g.
Returns Policy - March 2024). -
To update a document:
-
Upload a new version.
-
Delete the outdated one.
-
A single Library can contain multiple documents.

Enable in agent
-
Navigate →
Agents → Select Agent → Edit → Think Settings. -
Scroll to Library Access section and toggle enabled.
-
Select:
-
Tool Name: this identifies the tool inside the agent (e.g.
retrieve_context). -
Library: choose the library you created.
-
Prompt: explain when the agent should access the library (e.g., "If user asks for refund policy").
-
Similarity Threshold: adjust relevance sensitivity (default:
0.75). -
Number of Documents: max results returned for each search (default:
3). -
Messages (Optional): define what the agent says when searching or interrupted.
-

How it works during call
-
When the agent receives a user query during the call, it checks your Library Prompt for matching instructions.
-
If triggered, it will retrieve the most relevant documents based on your configured similarity threshold.
-
The agent then incorporates that document content into its reply.
Tips and best practices
-
Document formatting matters: ensure PDFs or text docs are clear, structured, and easy to chunk semantically.
-
One topic per doc: split large files into smaller topic-specific documents.
-
Use Prompt smartly: clearly define when the library should be used (e.g., refund, warranty, escalation).
-
Limit scope: avoid uploading large, general-purpose documents.
-
Test with sample queries to verify relevance and responses.
Example
Library Prompt:
If the user asks a question related to return, exchange, refund, or cancellation policies, search the library and respond using the content retrieved.
Similarity Threshold: 0.75
Max Documents: 3
Message (optional):
-
Before search: "Let me check that for you."
-
On interruption: "Just a second, finishing up my search."