Agentic Service
Valid from Datafari 7.0
The documentation below is valid from Datafari 7.0.
What is “Agentic” ?
The Agentic Service in Datafari enables the execution of AI-powered agents capable of reasoning, retrieving information and interacting with a collection of tools.
Unlike a traditional search query, an agent can:
Analyse the user request
Decide which actions are required
Use tools to retrieve or generate information (Datafari search, Retrieval-Augmented Generation, summarization, entity extraction…).
Combine multiple steps.
Produce a user-friendly response.
The Agentic Service is the core of the Datafari Assistant chatbot. It extends Datafari with a solution capable of orchestrating intelligent workflows.
The Agentic Service relies on:
Defined agent behaviors (including prompts, pre-built tools and custom tools)
This feature is designed to be modular, extensible and secure.
How to use the Agentic Service in Datafari ?
The Agentic Service is the main and default feature in Datafari Assistant. To enable it, you must follow the following steps.
Configure vector search (optional)
It is highly recommended to enable vector search, as the default Agent uses an Hybrid Search tool. For more information about how to enable and configure Vector Search, see this page: Datafari Vector Search
Vector search must be enabled BEFORE the indexing.
Configure a Chat Model
In order to run the Agentic Service, you need an external API running a model capable of performing agentic tasks and streaming. The service has been tested with OpenAI API (GPT-4O, GPT-4O-mini), and Mistral Cloud (Mistral Large).
Even though it has not been tested, any AI external service should be compatible, as long as they use one of theses API structure:
OpenAI API
Mistral Cloud
Hugging Face
Azure OpenAI
Ollama
Google AI Gemini API
Here is how to configure a Chat Model in Datafari.
Configure the AI-Powered API
In AdminUI, the Agentic Service can be enabled in the “AI Features > Datafari Assistant configuration”.
It is highly recommended to also enable RAG and Summarization services, since both of these can be used in agentic tools.
Use Datafari Assistant
Once the backend is ready, users can use Datafari Assistant to send a query to the Agentic Service.
By default, all queries are sent to the “RAG” agent, which uses generalist tools (search, summarization, RAG by document, entity extraction…). It is possible to call different agents by enabling them in the Datafari Assistant’s ui-config.json:
${DATAFARI_HOME}/assistant/ui-config.jsonAvailable agents
At the current stage of development, Datafari has three different agents.
RAG Agent
This is the default agent. The RAG Agent uses a collection of generalist tools to answer the user’s queries.
Tool | Description | Parameters |
|---|---|---|
RAG by document | The tool uses the existing Retrieval-Augmented Generation (RAG) feature to extract a response from one single document, reading its whole content. |
|
BM25 search | Executes a search query (BM25 ) and returns information (metadata) from retrieved documents. The content of the retrieved document is not returned. However, the returned IDs can be used with other tools (document reading, entities extraction...). |
|
Hybrid search | Executes a search query (Hybrid) and returns information and partial content from documents (Vector Search must be enabled). |
|
Read a chunk of document | Reads chunks of a document’s content. Chunks are retrieved from the VectorMain collection, which means that the Vector Search must be enabled beforehand. |
|
Search chunks from a document | Processes an hybrid search query within a specific document, and retrieves the most relevant chunks. |
|
Summarize | Retrieves or generates a summary of a document.
|
|
Entity extraction | Extract entities from a given document. |
|
Demo Agent
This Agent is a Proof-Of-Concept. It is designed to answers specific need, running complex tasks in a well defined set-up. It uses a fileset containing “Call for Tenders” documents.
In order to run properly, the dataset must be indexed with a specific job configuration.
The Demo Agent is mostly used for testing, experimenting, and demos.
Custom Agent
Work in Progress
At current stage of development, this feature is not available yet. It is designed to allow the creation of custom agent through a JSON file, providing custom made tools.
The objective is to provide companies solution to answer specific needs, using existing metadata.
Loop Control
The Loop Control is an optional feature that can be enabled or disabled in the “RAG & AI configuration” AdminUI. Instead of directly calling the Agent, the service invokes a “Supervisor Agent” that can:
Call the Agent (as a sub-agent)
Call the Evaluator sub-agent (ResponseScorer), that can evaluate the quality of a generated response.
First, the Agent tries to answer the user query for the first time. Then, the generated response is rated by the Evaluator, that assignes a rate from 0.0 to 1.0, based on multiple criteria, using the following prompt:
You are a reviewer assistant.
Give a review score between 0.0 and 1.0 for the following generated response based on how well it aligns with the style 'professional', its language that must be {{lang}}, and its structure.
The evaluated response must answer the user query as well as possible.
The evaluated response must not be truncated, and must not contain any prefix such as 'ASSISTANT:'
Return only the score and nothing else.
The original query is: "{{query}}"
The response to review is: "{{response}}"If the response get a score of 0.8 (configurable threshold) or higher, the response is sent to the user.
Else if the Agent was invoked three times (configurable) or more, and if the response gets a score of 0.6 or higher (configurable secondary threshold), the response is sent to the user.
Else if the Agent was invoked for more than N times (configurable maximum number of iteration allowed, default 3), the response is returned to the user.
Otherwise, the Agent is called again in order to generate a new response.
The token-by-token response streaming is not supported with loop control, since a response needs to be fully generated before the evaluation.
The Loop Control may significantly increase the duration of the agentic process, since the Agent may need to run multiple times before getting a satisfying response.
Frequently Asked Questions
Can the agent see and read files I can’t access myself ?
No.
If you are using Datafari Enterprise Edition with the file-level security enabled, the agent strictly respects Datafari authentication and authorization mechanisms.
If a user does not have access to a document, that document will not be retrieved and cannot be used to generate an answer.
Does the agent use its own knowledge, or only indexed documents?
The Agentic Service is designed to prioritize indexed documents as authoritative sources.
The system instructs the model to base its answers on retrieved documents and to avoid introducing unsupported information.
However, Large Language Models are probabilistic systems, and zero risk of hallucination does not exist. To increase transparency and reliability:
Retrieved sources are always displayed alongside the answer in Datafari Assistant.
Users can verify the information directly in the referenced documents.
Is my data sent to external AI providers?
It depends on the configured language model.
If an external AI provider (such as OpenAI, Azure OpenAI, or other third-party services) is used, user queries, prompts, and retrieved document excerpts will be sent to that provider to generate responses.
If a self-hosted or local model is configured, data remains within your infrastructure.
Can the Agent call external systems?
There are currently no tool calling external systems (other than the configured AI providers). However, such optional tools may be implemented in the future.