Agent Knowledge
Overview
Profound AI's Agent Knowledge feature allows you to upload enterprise-specific documentation, or any other unstructured data, to enhance the capabilities of your AI agents. The documentation can range from technical manuals and product information to internal policies and procedural guides. Once uploaded, these documents are indexed and made searchable by AI agents, enabling them to provide comprehensive and contextually relevant responses to user queries.
Table of Contents
Knowledge vs Instructions
It's important to distinguish between Knowledge Documents and Agent Instructions in Profound AI, as they serve different (yet complementary) roles in enhancing the capabilities of AI agents. The main difference is in how information is processed and utilized.
Knowledge Documents function like an encyclopedia, where documents are semantically searched and only relevant sections are read and processed as needed.
This allows these documents to contain vast amounts of information, accessible on demand.
In contrast, Agent Instructions are limited by the large language model's system prompt token limit, as it involves preloaded instructions that are read all at once.
The semantic search capability of Knowledge Documents ensures efficient token usage, as the AI agents only reference and process the specific parts of documents pertinent to a query. This distinction makes Knowledge Documents ideal for handling complex, information-rich queries while Agent Instructions are more suited for providing concise, predetermined information that must fit within the token limit constraints.
Semantic Search
Semantic search refers to a search process that goes beyond the literal or explicit matching of query words or phrases. Unlike traditional keyword-based search which focuses on finding exact matches or synonyms in the text, semantic search aims to understand the intent and contextual meaning behind a search query.
In semantic search, the system interprets the nuances of language, such as the user's intent, the relationship between words, and the context in which they are used. This involves using advanced natural language processing (NLP) techniques and understanding the semantics within the content.
For example: If someone searches for "tips for remote work", a semantic search system wouldn't just look for document sections containing those exact words. Instead, it would also find relevant content discussing topics like "home office setup", "productivity in virtual environments", or "telecommuting best practices", understanding that these are contextually related to the original query.
In the context of Profound AI's Knowledge Documents, semantic search enables the AI agents to sift through extensive documentation and find the most relevant sections that answer or relate to the user's query. The approach used is typically referred to as RAG (Retrieval-Augmented Generation). This approach ensures more accurate, context-aware responses and a better understanding of user needs, compared to traditional keyword-based search methods.
Uploading Documents
Profound AI supports various file formats, including PDF, text, and Word documents.
To add new documents, click the Add icon in the Knowledge Documents section of the IDE.
A new dialog will appear, where you can upload, remove, or select documents.
This list of uploaded documents can be shared among multiple agents.
Selecting and Indexing Documents
To assign a document to the agent, double-click the desired document, or single-click it and then click the Select button.
Before the document is usable within your agent, you must click the Sync button in the Knowledge Documents section.
This will index the selected document(s) in a vector database allowing for semantic search.
Finally, test the knowledge document search capabilities by typing a query in the Agent Preview section of the IDE.
RAG Options
RAG functionality is only supported with OpenAI models. Other AI providers (such as Google or Anthropic) do not support Knowledge Documents or RAG in Profound AI. The model must also use the OpenAI assistants API format, so models configured with apiFormat: "completion" – including Azure OpenAI models – are not supported either.
When no RAG configuration is provided, default settings are used.
A model can optionally be configured to use specific RAG (Retrieval-Augmented Generation) options (see Model Configuration for additional details).
A RAG configuration consists of a single option:
Provider - Points to the service or library of code that provides RAG capabilities. The only supported provider is
openai.
The provider handles the remaining parts of the RAG process automatically. These are not configurable in Profound AI:
Embedding Model - The model that translates text into a representation of meaning in the form of embeddings, which are also known as vectors.
The
openaiprovider uses a default embedding model from OpenAI.
Vector Database - The database that holds the indexed documents. The documents are broken up into chunks, assigned embeddings/vectors using the Embedding Model, and then placed into the database.
The
openaiprovider uses the built-in cloud vector store provided by OpenAI.
Example
The example below defines a single model in the models section of the config.js file and enables RAG for it. Use a configuration like this when you want an agent to answer questions from uploaded Knowledge Documents and to show which document each answer came from.
Prerequisites:
An OpenAI API key, stored here in the
OPENAI_API_KEYenvironment variable.A model that uses the OpenAI assistants API format. This is the format used by default when provider is
openaiand the apiFormat property is not specified.At least one document uploaded and selected in the Knowledge Documents section of the IDE, and then indexed with the Sync option (see Selecting and Indexing Documents above).
Expected behavior: When an end-user asks the agent a question, Profound AI semantically searches the indexed Knowledge Documents and passes only the relevant sections to the model. Because showCitations is set to true, the name of the source document is displayed alongside the response, and the referenced document text is shown when the user hovers over that name.
models: {
"GPT-4o (RAG + citations)": {
provider: "openai", // RAG is only supported with the openai provider
model: "gpt-4o",
apiKey: process.env.OPENAI_API_KEY, // OpenAI API key, read from the environment
defaultAssistantId: process.env.OPENAI_ASSISTANT_ID, // Assistant used when the agent does not supply its own
showCitations: true, // Show the Knowledge Document each answer came from
stream: true, // Return the response as it is generated
// Retrieval-Augmented Generation configuration.
// This object is optional - omit it entirely to use the default RAG settings.
rag: {
provider: "openai" // Only supported value, and also the default
}
}
}