PT EN
Back to site

Search

Finding one piece of information in an archive of millions of documents used to require guesswork: the exact word, the right filter, several attempts. In DATTA's Search you ask in Portuguese, as you would ask a colleague — and receive, on the same screen, the answer written by the AI and the documents that support it, side by side. No more switching between "chat on one side, search on the other".

Where it lives today: everyday search is embedded in Chat (side menu). The "Busca" entry that existed in the Descobrir (Discover) section was removed on 2026-05-31; the dedicated page keeps working via direct URL (deeplink) — useful for bookmarks and shared links.


ScenarioDoes Search answer it?
"How does intercurrent prescription work?"Yes — the AI explains + supporting documents
"Show STJ rulings on art. 924 of the CPC"Yes — ranked case-law list
"I need a revenue dashboard"No — use DATTA BI
"I want to run an ETL pipeline"No — use DATTA Extract
"Analyze data statistically with R"No — use the Notebook

Search is for exploratory questions about content (legislation, case law, cases, regulations, documents). To create artifacts — dashboards, pipelines, notebooks — use the specialized copilots.


How to use it

For everyday use, go to Chat in the side menu — it covers AI-powered search with documents. The dedicated page opens via direct URL: https://<your-domain>/search-hybrid.html (or, inside the shell, https://<your-domain>/index.html?view=search-hybrid, with the breadcrumb DATTA › Descobrir › Busca).

2. Type the question

The field accepts any question in Portuguese. The placeholder "Como posso ajudar?" signals that you do not need to format anything.

Examples:

  • prescricao intercorrente execucao fiscal
  • Qual o prazo para embargos de declaracao?
  • Empresas com socio em comum com CNPJ 12.345.678/0001-90
  • Decisoes do STJ sobre tutela de urgencia em ambito tributario

Click Buscar or press Enter.

3. Read the AI answer

Right below the field, the Resposta da IA (AI answer) card appears:

  • The text shows up gradually, in real time, while the AI writes.
  • By default the answer is visually truncated after a few lines, with a "fade" effect.
  • Click Continuar... to expand the full answer on the same page.
  • Click Abrir no chat completo to continue the conversation interactively in the traditional chat.

4. Explore the documents

Below the answer, the Documentos relevantes (relevant documents) list appears, paginated 10 at a time. Each item shows:

  • The document title (e.g. "STJ — REsp 1.234.567/SP — Prescrição...")
  • The source (STJ, CPC, LEF, ...)
  • The relevance score
  • Ranks from each algorithm: BM25, kNN and Graph (when applicable)
  • The excerpt with the search terms highlighted in yellow

5. Open a document

Click any document card. A side panel slides in from the right with:

  • The breadcrumb Busca › <document title>
  • The relevant excerpt that produced the result
  • The Mostrar documento completo button — the full text appears, reconstructed from the indexed excerpts

To close it: press ESC, click the panel's X, or click outside it.


How search works under the hood

Your question triggers two paths in parallel:

  1. The AI answer — a language model writes a synthesis in Portuguese, with sources cited, and streams the text in real time.
  2. Hybrid text search — three ranking strategies combined:
    • BM25 — literal text matching;
    • Semantic kNN — similarity of meaning through vectors, generated by the platform's active embedding model;
    • Graph — the document's connections to the rest of the base in the graph.

The three rankings are fused by 3-way RRF (Reciprocal Rank Fusion): each document gets a scale-invariant final score. The waiting window is a few seconds — if one of the paths is slow, you keep seeing the other one load, and the screen never sits blank waiting for the slowest.

The same capabilities are available for integration: the platform exposes a hybrid search endpoint and a streaming AI answer endpoint — see the API reference. Technical details of the ranking fusion are in quill-search-suggest, section "RRF 3-way real".


Useful shortcuts

ShortcutAction
Enter in the search fieldRuns the search
ESC in the document panelCloses the panel
Click a document cardOpens the detail panel
Tab + Enter on the cardOpens the panel from the keyboard (accessibility)

Limits and expectations

  • Volume: pagination 10 items at a time. For more precise results, refine the question — include the court, the year, the article.
  • Speed: p95 under 500 ms for the BM25 + kNN part; the AI answer depends on the model configured in the platform (local vLLM Qwen3/DeepSeek, or Gemini as the alternative).
  • Freshness: Search uses live OpenSearch indices — new documents become searchable as soon as they are ingested and catalogued automatically, with no manual reindexing.
  • Privacy: all searching happens inside your own infrastructure. No data leaves the datacenter — including the question sent to the AI, which is processed by the local model when it is configured.

When something does not work

SymptomLikely causeWhat to do
"Nenhum documento encontrado" (no documents found)Term too specific or not indexedRephrase or broaden the scope
Empty AI answer + ":("AI model temporarily unavailableTry again in 30 s; the notice comes in Portuguese
Full document with no contentDocument with no traceable excerptAsk the administrator for a reindexing
Session expiring all the timeBrowser session failureReport it — fixed on 2026-05-26

Search in Chat — cards, anchor page and conversation mode

Since 2026-05-28, the main Chat displays search results as structured cards next to the AI answer — the same experience as the Search page, now integrated into the conversation.

When the cards appear

The chat automatically detects when the question asks for a listing:

  • Imperative verbs: "liste", "mostre", "exiba", "apresente", "me dê", "quais são", "todos os" / "todas as", "relacione".
  • Searches by entity or case (e.g. liste informacoes da Maria, processos do CNPJ 12.345.678/0001-90) always activate cards.

Conversational questions (ola, explique o art. 924) keep the inline answer, without cards.

Anchor page (default)

When you send a listing question, the screen works as a results page:

  • The cards appear above the answer as soon as the platform finds the records — even before the AI text finishes arriving.
  • Each card shows title, excerpt, source (Neo4j, OpenSearch, Trino/JDBC) and score.
  • Long AI answers stay compacted: a preview with a fade effect and the Expandir resposta completa button. Compaction applies from the start of the stream — the bubble does not "jump" when the answer finishes.

Details of a result

Click any card: a panel opens with the key-value table of all the record's properties (name, CPF, address, etc.), with labels in Portuguese. When the result is a textual document, the Abrir documento completo button leads to the full text.

Conversation mode

Click Expandir resposta completa to enter conversation mode, geared toward reading and focused dialogue with the AI:

  • All long answers show their full content.
  • The cards disappear to keep the focus on the text.
  • A discreet banner at the top offers ← Voltar à página de resultados, which restores the cards and the compacted previews.
ActionResult
Listing questionCards + AI preview (anchor page)
Click a cardPanel with the record's properties
Expandir resposta completaConversation mode (cards hidden, full text)
← Voltar à página de resultadosAnchor page restored

Workspace in the composer — and the history sections

Next to the context indicator there is the workspace selector. They are two distinct controls, and the difference matters:

WorkspaceContext
What it doeslimits the search to its contexts, groups the history into sections and filters which panels appearwithin the workspace, refines which bases the AI draws the answer from
Where it isselector to the left of the composerindicator next to it

The two compose: choosing a workspace in the selector restricts the search to that workspace's contexts (the same scope, resolved on the server with your identity, as the Workspace chat described below), and the context indicator lists only the workspace's contexts — turning one off removes it from the search; there is no way to turn on a context from outside. Todos os workspaces is the unscoped state: the search reaches every active context. In that state the selector button reads just Workspaces — the selector's name, like Contextos and Persona next to it; with a workspace chosen, it shows the workspace's name.

Until 2026-09-18 the selector only organised the history and the search kept reaching every base; the change came from a measurement in which a chosen workspace got answers from contexts outside it.

The history is sectioned by workspace, with the section of the current scope first — that is where a new conversation lands: the active workspace's or, under Todos os workspaces, Sem workspace. A conversation keeps the workspace it was born in and does not change section later — switching workspace changes which sections you see, not whose the conversations are. Conversations created under Todos os workspaces — including the ones opened by Continuar no Chat in the Process Panel in that scope —, and every one from before this change, sit under Sem workspace.

Switching the workspace here is the same as switching it from the side menu: it holds for the whole platform.

Conversation history

The history panel is open by default — it is where a new conversation is created, and hiding it hid the button. If you minimize it, the choice is kept in the browser and holds on later visits.

The history is permanent. Once a question is answered, the message stays on the platform: the chat has no option to delete a conversation. Only an administrator deletes history, in Sistema › Histórico do chat — everything or the oldest days, always from oldest to newest.

Each conversation has a ⋯ menu (appears on hover) with the Renomear option, which opens a field with the current title already selected. Enter saves, Esc cancels.

The dialogs do not close on an outside click, deliberately: renaming would lose what you typed. Esc cancels either one.

The list shows the 100 most recent conversations; Carregar mais conversas, at its end, brings the next ones.

A reopened conversation shows the answer as it was given: the text, the context that answered, the source cards and count, and the answer's table, graph and map. The table and graph data are read again from the base when you open them — the same read the table does when you turn a page.

No answer is lost on the way. If you click Parar, close the tab or the connection drops, what had already appeared is recorded, with the notice "Resposta interrompida antes de terminar.". If an error happens midway, what was shown and the error notice are kept. And if the platform cannot record an answer, the message itself says so — "Esta resposta não pôde ser gravada no histórico do chat." —; if it cannot record the question, the question is not processed at all, and the chat asks you to try again.

The title is generated automatically once the first answer finishes — before that, and whenever generation fails, the beginning of your question stands in. It is written once: if you rename it, the platform does not overwrite you.

Nova conversa with a conversation in progress also asks first — and the copy says what matters: the current conversation is not lost, it stays in the history.

When the new conversation starts, the history collapses on its own — on mobile and on desktop — and the screen is left to it. The Mostrar histórico button, in the top-left corner of the chat, brings it back. This collapse does not count as minimizing: the choice kept in the browser stays the same.

Side panel — panels and graph as tabs

The Chat opens a panel on the right for what needs to be seen beside the conversation, not instead of it. The panel has a tab bar: each thing you open becomes a tab, and the tabs coexist.

How to open itTab created
Painéis, in the composer areaPainéis — the list of panels you can access; picking one opens it right there
Explorar dados desta resposta, on an AI answerGrafo — the entities and links of that answer

What the panel does:

  • Each tab closes on its own through its ×; the × at the top closes the whole panel.
  • The width is adjustable: drag the panel's left edge. The measure is kept in the browser and comes back next time.
  • Expand (the outward-arrows icon at the top) makes the panel take the whole screen, hiding the conversation and the history; the same button collapses it. Esc collapses the expansion and, on an already collapsed panel, closes it.
  • The panel belongs to the conversation: it closes when you switch conversations in the history or start a new one. Keeping it open would leave one conversation's graph next to another conversation's messages.

The graph used to be a window covering the whole screen — reading the answer and exploring the links were two things that did not fit together. As a tab, both are visible at once; when the graph needs room, the expand button gives the full screen back.

On mobile the panel covers the screen, like any drawer: there is no column to split at that width.

Where the results come from

Entity search queries all sources in parallel: the graph databases of the registered contexts (resolved dynamically from configuration, never hardcoded), the domain document indices, and the connected database agents. The platform's internal data — telemetry, audit, permissions — is excluded automatically.

Context selector — choose what the search considers

At the top of the screen, the Contextos selector lists every context registered on the platform, each with its connection status and a toggle to enable or disable that context in search:

  • A disabled context is fully removed from search: its graph, documents and indices are not queried on any route — neither in targeted search, nor in the cross-context sweep, nor in the card results page.
  • If a question points to a disabled context, search continues on the active contexts only — no error is returned. The assistant is also instructed not to answer from its own knowledge about the disabled context's content: instead of reciting the information, it tells you the context is disabled and how to re-enable it.
  • When any context is disabled, the selector label shows the count (e.g. Contextos (3/5 ativos)).
  • Click the context name to open its configuration (as before); the toggle only affects search.

The selection is per user and saved on the platform (not in the browser): signing in on another machine keeps the same contexts on/off. A newly created context starts active. Unauthenticated users don't see the toggles — search considers everything.

Contexts in the composer — and automatic widening

The Contextos indicator sits next to the question field, not at the top of the screen: changing the scope affects the next question, so the filter lives next to the point of action. Clicking opens the list, each context has a checkbox, and the change applies immediately — there is no confirm button. The selection is the same one as the top selector: a per-user preference kept on the server.

At the top of the list, the Selecionar todos box checks or unchecks every context at once: with everything on it shows as checked and clicking turns everything off; with only some on it shows a dash and clicking turns everything on. It is the quick path to searching in just a few contexts: uncheck all, then check only the ones the question needs. With no context checked the list warns you — the search never reaches a disabled context, so "none checked" is not "search everything".

A context is not a workspace. The workspace defines the set of contexts the search may reach (and organises history and panels); the context selector refines within that set. With an active workspace the list shows only its contexts; with "Todos os workspaces", the whole collection.

The AI's tools honour the same scope. Not only the search: when the model queries the graph or the documents on its own (the cypher_query, schema_info, semantic_search tools and the like), a context you turned off — or one the workspace does not reach — is refused with the reason, and the model is steered to the available contexts. The universal search tool (global_search), which sweeps every source with no scope, does not exist for the chat.

Database Agents only when selected. The agent selector (database icon in the composer) is the only way for the chat to query a Database Agent: with no agent selected the jdbc_lookup tool is not offered to the model and the search touches no agent; with an agent selected, only that one can be queried. Until 2026-09-18 every registered agent entered every question — and the model went to the CNPJ agent to answer what the FEBRABAN context already answers.

Questions about relations between entities — "partner of another company with the same CNAE", "companies of one accountant at the same address", "degrees of separation between a CPF and a CNPJ", "what is the relationship between two people" — have their own route: instead of retrieving document passages, the assistant reads the context's schema (schema_info), builds and runs a graph traversal (cypher_query) and answers with the data found, the criterion applied and what the schema does not have to answer (data missing from the graph is never invented). In a context that gathers several databases — one per source, like FEBRABAN with the Federal Revenue, CVM, BCB and the negative list — the schema says in which database each node type lives, and the query goes to the right one.

Advanced analysis — graph algorithms and statistics. Questions like "which companies are most central in the partner network", "detect communities of companies linked by the same partners", "is there a correlation between size and number of partners", "what is the distribution of share capital by municipality" or "forecast of company openings" follow another script: the assistant first discovers what the platform offers — the graph-algorithm catalogue (Neo4j GDS, run by DATTAX), the R runtime packages and the statistics engine —, reads the source's data model, executes through the right tool (a DATTAX pipeline with the algorithm on a filtered subgraph, a statistical profile of the source, or an R script over already-aggregated rows) and answers with the numbers, the method used and what was truncated. When a resource does not exist in the installation — the R runtime is optional — the answer says so and follows the alternative; nothing is invented.

Which engine the answer used. When the answer ran a graph algorithm or an R script, a line right below "Respondido a partir de N fontes" (answered from N sources) says which: Busca avançada usando GDS, Busca avançada usando R or Busca avançada usando GDS + R (advanced search using GDS, R, or GDS + R). The line counts only what actually ran — looking up the algorithm catalogue or trying an unavailable runtime does not count — and comes back with the conversation when you reopen it from the history. While the answer is being prepared, the indicator stays "Processando..." (processing).

The Pesquisa / Investigação mode is gone. It used to be the analyst who signalled, through a button, that the question deserved sweeping every base — which required knowing that before asking. Now the search decides:

  • the question is answered in the context the platform identifies;
  • if there is no result there, the search widens on its own to the other contexts you have access to;
  • widening does not widen permission: a context you turned off, or one the workspace does not reach, stays out;
  • when the answer comes from another context, it says so — the scope change is never silent.

Persona selector — the chat answers as an agent

Next to the context selector there is a Persona button. It opens the list of persona agents registered under AgentesAgentes Personas — the curated ones are Promotor de Justiça, Advogado, Revisor Processual and Juiz — plus Nenhuma (none), which is the default. Once a persona is chosen, the answer is written in that role: the persona text is inserted into the AI instructions between the platform instructions and your default prompt, and the tools the AI may use are limited to the persona's list (a Judge whose list has no graph query will not run one, even if the question asks for it). A chip with the persona name appears in the composer; the × goes back to "Nenhuma".

  • One persona per conversation: two at once would produce contradictory instructions. The choice is saved with the conversation and comes back when you reopen it from the history; a new conversation starts without a persona.
  • Each persona requires its own permission, and the four built-in roles (administrator, advanced user, analyst and read-only) all start with every one of them: a persona steers the kind of answer, it does not widen the data or the tools the user could already reach. In a custom role that lacks the permission, the persona appears disabled in the list, with the reason, and the platform refuses the message if the request arrives anyway. Permissions are granted per role under SistemaSegurançaRoles e Permissões.
  • A persona is not a context: it changes how the AI answers; the contexts still decide where the search looks.

Workspace chat — search scoped to the workspace's contexts

Opening the Chat from a workspace's menu (the chat icon inside the workspace group in the side menu) takes you to a dedicated, scoped chat screen: every search considers only that workspace's contexts, not the general data of the home screen.

  • The Contextos indicator, in the composer area, shows how many of the workspace's contexts are in the search — e.g. Contextos 3/4 when one is off.

The chat learns from you

The chat uses your own history — never other users' — to improve answers:

  • Per-user memory: besides previous question/answer pairs, excerpts from old conversations that are semantically close to the current question enter the answer's context. The ongoing conversation is not duplicated, and another user's history never shows up.
  • Rate the answer: every assistant answer carries the useful / not useful actions (thumbs up/down — shown on hover over the message; always visible on mobile). The rating feeds the search learning loop, and "not useful" outweighs any automatic signal. Only the conversation's owner can rate it; a failed submission shows a notice and allows retrying.
  • Clicks personalize ranking: documents you opened in the results gain priority in your next answers — a personal signal, with a hash-protected identifier, that also applies to the card results page.
  • Corrections become query expansion: when you rephrase a question and the new wording works (or you mark "useful"), the platform learns the association — first for you, then for everyone.

Answer formatting

The assistant's answer arrives formatted: bold, code, headings, lists and tables. Each AI model formats in its own way — Gemini tends to answer with lists, gpt-oss-120b with tables — and the chat shows both the same way: a table the model writes appears as a table, with header and borders, without the bars (|) and the row of dashes of the markup. The process number appears with the plain hyphen and can be copied and pasted into the search. That table is part of the answer text; the paginated table, described next, is something else — it comes from a query the platform runs.

Answer as a table — paginated lists

When the question asks for a list of records — "list the active companies in the state of São Paulo", "which partners hold a stake in more than one company", "list the cases by court" —, the answer does not come as running text: the chat builds a paginated table inside the message itself.

How it works

  1. The intent detector decides, together with the question type, the delivery format: markdown text or table. A list request (listing verb + plural, "which companies…", an aggregation "by municipality") becomes a table; concept, comparison, procedure, a simple count ("how many companies") and greetings stay text. "As a table" or "as a spreadsheet" in the question forces the table.
  2. For the table the model does not write the list: it writes one read-only query with the columns relevant to the question — as many as needed — and the platform counts the total, runs the first page and shows the result. The answer text is only a summary: total, criterion applied, what each column means and caveats. The column order is the question's — no column is pinned first — and each column name describes the value as stored: a field holding two facts in one value gets a name that says both. The company name in the CNPJ graph is the case: the Federal Revenue registers the individual entrepreneur as "01.130.026 JOSE PAULO LABBATE" (CNPJ root followed by the name), so the column is named "CNPJ Raiz e Nome Empresarial", not "Razão Social" — in the CSV the reader only has the header to know the numeric prefix is part of the official record. When the record carries the owner's CPF at the end of the name (the most common form for MEIs), the column is named "Nome Empresarial e CPF do Titular".
  3. The table has a fixed header, horizontal and vertical scrolling (there is no column limit), page navigation, "go to page", a selector of 100 or 500 records per page (default 500) and "Export CSV", which downloads the whole table (every page) as a .csv file with ; as separator and Excel-ready UTF-8. Numbers are right-aligned; empty values show as "—". Export is capped at 100,000 records: above that the UI says how many there are and asks you to narrow the question, instead of handing over a truncated file.
  4. A relationship question (partners in common, same address, same CNAE) becomes a table even when phrased as "is there any partner who…": the useful answer is the relation, not the "yes". Only a count ("how many partners in common") and a path between two points ("degrees of separation between") stay text.
  5. If the model's query comes back empty, no table is shown: the model is told to fix the query (uppercase, full path to the entity) and try again; only then does it answer, in text, that there are no records and which criterion it used.
  6. In a pairs question ("companies sharing the same address") each row is a distinct pair: the platform checks the first page and refuses a query that compares an entity with itself or repeats the mirrored pair, and the model rewrites it.

What to expect

  • Each page is fetched from the server when you navigate; the whole list is never loaded at once.
  • The table stays available for 2 hours, renewed on every page read. Reopening the conversation after that shows "This table has expired…" — ask the question again to generate it.
  • Only the person who asked can browse the table — or export it.
  • Without an explicit ordering in the query the order between pages is not guaranteed — the table says so.
  • Today the table comes from the contexts' graph databases. Lists from databases connected through a Database Agent still come as text.

Answer map — the answer's location properties on Google Maps

Every AI answer has a "Map" button (next to "Graph"). It opens Google Maps already on the best location property the platform identified in the answer, and the Properties button at the top of the map lists every candidate so you can mark one or several:

  • Company — by name or by CNPJ; when the company is in the registry base the marker goes to its real address (with coordinates when available); otherwise Google looks it up by name.
  • Address written in the answer ("Rua das Flores, 123, Centro").
  • Postal code, municipality ("município de Campinas", "Campinas/SP", "sede em Uberlândia") and state.

The list is ordered from the most precise candidate (company with an address in the base) to the least (state); the first one comes pre-marked. Each marked property becomes a numbered marker, the map fits them all and the chips under the toolbar jump to each one. Unmark on the chip or in the list.

Map tools — all of Google's: map type (roads, satellite, hybrid, terrain), Street View (its own panel or the dragged pegman), fullscreen, zoom, scale, rotation and free gestures; place search in the field over the map (the chosen place joins as a marked property); Route between the marked properties, in marking order — driving, walking, transit or bicycling — with distance and time, draggable on the map; Layers for live traffic, transit and bicycling; and "Open in Google Maps", which carries the same selection (or the route) to Google's site.

What to expect

  • A property Google cannot locate stays in the list with a warning and no marker; a position found only by municipality or by company name is flagged as approximate in the marker window.
  • With no candidate in the answer, the map opens on Brazil and place search stays available.
  • The map depends on the Google key configured in System › Maps; without it, or on an installation with no internet egress, the modal says so and whom to ask.

An entity the context does not have — the platform asks before swapping

If the question names an entity the context's data model does not have — "which companies of an accountant share the same address?" in a context whose graph has companies, establishments, addresses and people (partners and administrators), but no accountants —, the chat does not silently answer with another entity. It says what is missing, proposes the closest entity in the data model and asks:

This context has no accountant entity. The closest one in the data model is Pessoa (the person linked to the company as a partner or administrator). Do you want me to answer using Pessoa instead of accountant? The question would become: Which companies of a person share the same address? Reply yes to substitute or no to keep the question as it is.

  • Yes (or "go ahead", "substitute") runs the rewritten question; the answer opens with "Substituting accountant with Pessoa, as you confirmed." and continues like any other — table, summary, sources.
  • No keeps the question and the chat explains that, without the substitution, it cannot be answered in this context.
  • Any other message discards the proposal. It also expires on its own after 10 minutes.

The proposed entity comes from the context's own schema, validated by the platform: it is never a fixed configuration pair, so new contexts with different data models work the same way.

The context learns from your answers. Every "yes" and every "no" is recorded in the context: the next time someone mentions the same missing entity, the chat proposes the same pair and says "this substitution has already been confirmed N times in this context" — and still asks, because swapping the entity changes the question. Property synonyms ("company name" is the legal name, "capital" is the share capital), on the other hand, apply by default with no question: when the model reads one of your terms as a property of the data model, the platform checks that it exists and keeps the synonym for the next questions. Whoever administers the context sees all of this under System › Contexts › Learned substitutions, can add a synonym by hand and "forget" what no longer makes sense; a pair whose label or property no longer exists in the data model shows as obsolete and is not suggested.

Where to read more

  • Related pages: user's custom prompt · chat reasoning model
  • Ranking fusion architecture: quill-search-suggest; the chat behavior (listing mode, anchor page and conversation mode) is detailed in the chat architecture documentation.