Create an agent powered by your documents
At a glance
This tutorial walks you through creating an AI agent capable of answering your users' questions based on your internal documents (PDF, Word, web pages). The agent searches for relevant information in your knowledge base and provides sourced answers.
Modules used: Knowledge Base, Agent Studio.
Estimated time: 15 minutes.
What you'll do
- Import documents into the knowledge base
- Wait for indexing to complete
- Create a specialized agent
- Configure the document search tools
- Test the agent with questions
Prerequisites
- An active Ontologie workspace
- Documents to import (PDF, DOCX, or URLs)
Step 1: Import documents
- Go to Knowledge Base from the sidebar.
- Click + Import.
- Select the import mode:
- Files: drag and drop your PDFs or Word documents
- URL: enter the address of a web page to index
- Click Import.
Indexing starts automatically. Each document goes through several stages:
- Text extraction
- Segmentation into chunks
- Embedding generation (vector representations)
- Indexing for search
Wait until the status of each document changes to Indexed before continuing.
For more details: Import documents.
Step 2: Create a specialized agent
- Go to Agent Studio.
- Click + Create an agent.
- Fill in the configuration:
- Name:
Documentation Assistant(or a name of your choice) - System instructions: describe the agent's role, for example:
- Name:
You are a specialized assistant that answers questions based on
the company's internal documentation. Always cite your sources.
If you cannot find the information in the documents, say so
clearly rather than making up an answer.
- Click Create.
Step 3: Configure the tools
- In the agent configuration, go to the Tools tab.
- Enable the following tools:
| Tool | Description |
|---|---|
searchDocumentation | Searches the knowledge base by semantic relevance |
hybridSearch | Combined search (semantic + keywords + graph) |
- Disable unnecessary tools to avoid distractions (e.g. spreadsheet tools if the agent should not access them).
Step 4: Test the agent
-
Open the agent's chat.
-
Ask questions based on the content of your documents:
What is the refund policy?How do I configure module X?What are the steps for process Y?
-
Verify that the agent:
- Responds based on the imported documents
- Cites the sources (document name, section)
- Clearly indicates when it cannot find the information
Using the Visualizer
To understand the agent's reasoning:
- Click Visualizer in the toolbar.
- Observe the OODA loop: the agent observes the question, orients toward the right tools, decides on a search strategy, and acts by querying the knowledge base.
For more details: Visualizer.
Step 5: Refine
If the answers are not satisfactory:
| Problem | Solution |
|---|---|
| The agent can't find the information | Verify that the documents are properly indexed (status "Indexed") |
| Answers are too generic | Improve the system instructions with concrete examples |
| The agent makes up information | Add to the instructions: "Only answer if you find the information in the documents" |
| Answers in the wrong language | Specify in the instructions: "Always answer in English" |
Expected outcome
Your AI agent answers questions based on your internal documents. The answers are sourced and reliable. You can enrich the knowledge base at any time by importing new documents.
Going further
- Knowledge sources — Supported source types
- Knowledge graph — Explore links between documents
- Test and evaluate — Measure answer quality
- Connect and analyze — Add structured data
Need help?
Contact us: Support and contact.