Skip to content
Choose the Tool that answers the question
Public Preview

Library search: tools, processing, and results

Explains how the Find, Match, List, and Read tools search Libraries, how OCR and nesting affect extraction, and how result order carries relevance.

This page explains how agents choose search tools, handle partial results, what Duale AI extracts from documents, how pages become passages, and how to interpret result order.

  • Tool selection: Find, Match, List, and Read matching behavior.
  • Partial results and actions to recover a complete answer.
  • Document extraction: OCR, picture search, and nesting.
  • Page-to-passage boundaries and extraction failure handling.
  • Result ordering and relevance number interpretation.

Summaries were generated by AI.

Two questions arrive at the same documents. What does the contract say about termination? Where does invoice 4471 appear? During a Task, the model can request Find for the first and Match for the second. Your code calls neither Tool.

You control the corpus and which Libraries the Task’s Agent Identity can reach. The shape of that corpus therefore affects which questions return a usable answer. The rest of this page explains how those choices affect matching and returned results.

Choose the Tool that answers the question

Each tool matches something different, and the model chooses one for each call.

ToolYour questionWhat it matchesName in the Task view
FindWhat does the contract say about termination?Meaning, in the text of your documents and in the pictures inside them. It does not guarantee a literal string match.file_search
MatchWhere does invoice 4471 appear?One string, or several separated by |, within one line of the text. It ignores case and accents and is not a regular expression.file_grep
ListWhich documents are in the Libraries I can reach?Documents in every Library allowed to the Agent Identity, in any status, filtered by part of a filenamefile_ls
ReadWhat do those lines say, word for word?One document over a line rangefile_cat
  • Tool
    Find
    Your question
    What does the contract say about termination?
    What it matches
    Meaning, in the text of your documents and in the pictures inside them. It does not guarantee a literal string match.
    Name in the Task view
    file_search
  • Tool
    Match
    Your question
    Where does invoice 4471 appear?
    What it matches
    One string, or several separated by |, within one line of the text. It ignores case and accents and is not a regular expression.
    Name in the Task view
    file_grep
  • Tool
    List
    Your question
    Which documents are in the Libraries I can reach?
    What it matches
    Documents in every Library allowed to the Agent Identity, in any status, filtered by part of a filename
    Name in the Task view
    file_ls
  • Tool
    Read
    Your question
    What do those lines say, word for word?
    What it matches
    One document over a line range
    Name in the Task view
    file_cat

The last column holds the name that the Dashboard Task view shows for each Tool Call. These names are not a versioned interface. Read them as current Dashboard output, not as an API.

The Find tool is semantic search: it orders passages by what they mean, and it is not a literal keyword search. An invoice number, an error code, or a part reference therefore goes to the Match tool, which matches the string literally.

The Match tool ignores case and accents in your text and in the string it looks for. For example, lefevre finds Lefèvre and LEFÈVRE, and strasse finds Straße. Punctuation matches itself: FAC-2026-0412 does not match FAC 2026 0412. In one call, the model can look for several alternatives of one name or reference, separated by |, such as dupont|dupond|du pont. Each result holds at least one of them. Each alternative needs at least three characters, so Match finds a two-character code only inside a longer string. If one alternative is too short, the whole request fails.

Match reads one line at a time. A string that a line break splits is not found, so keep an exact reference on one line of the source.

Meaning can also carry across languages. A query written in French can retrieve a passage written in English, and the reverse, so one set of documents can serve readers in several working languages without a translation pass.

Retrieval across languages is not equally strong in every language, and Duale AI publishes no per-language figure. If a working language of yours is not among the widely used ones, test it on your own questions before you commit a set of documents to it.

Two behaviors change how the model works through an answer:

  • The Match tool reports the first match inside each passage, not every occurrence. It answers where to look, and the Read tool then reads around one of those places.
  • The List tool lists documents in any status, including the ones Duale AI is still processing, and reports that status. A document that the Find tool does not return can still be on its way to ready. Manage libraries defines each status and shows how to wait.

Each tool returns at most a fixed number of results for one call, and the Read tool reads one document for one call. Limits states each ceiling. Your own code passes none of them.

Read an answer that stopped early

A partial answer is a normal answer. Find and Match both report whether they finished, and Duale AI marks a result incomplete when the request stopped before it read every Library that the Agent Identity can reach.

So an empty result that reports it stopped means the search ran out of effort, not that your documents hold no match. Read that answer as one pass over part of the Libraries the Agent Identity can reach.

Library access follows the Task’s Agent Identity, not the documents attached to that Task. Access and isolation owns that rule.

One document search covers every Library the Agent Identity can reach, and the effort it is allowed belongs to the request rather than to each Library. A search across more Libraries is therefore more likely to stop before it has read everything.

Two actions bring back a complete answer:

  • Narrow the question. A tighter question reaches its matches sooner.
  • Reduce the Libraries the Agent Identity can reach. Design your Libraries covers how to split a corpus so each identity reaches what its work needs and no more.

What Duale AI reads, and what comes back

Duale AI makes extracted text and the pictures it can decode searchable. A document can reach ready with either kind of content.

Duale AI uses optical character recognition (OCR) to read characters in pictures. The words OCR recovers join the searchable text, while the picture remains searchable as a picture. A picture with no readable OCR can therefore still answer a visual question.

What Duale AI reads from a document, and what a question gets backYou upload a document. Duale AI extracts its text, runs optical character recognition on its pictures, and keeps the pictures it can decode. It follows a document nested inside the source in the same way. Extracted text, words recovered from pictures, and decoded pictures become searchable. A question searches them together. A text result names its page. A matching picture reaches the model only when the tenant's model pool has an image-capable model that can carry it.

Four consequences follow:

  • Nesting is followed. A file inside an archive, or a PDF inside a word-processor document, is opened and read the same way as the document that carried it.
  • A hit brings its place with it. An answer names the page the text sat on, so the model can read around it and quote it.
  • OCR and picture search are separate. OCR can add words to the searchable text. A picture remains searchable when OCR recovers no readable words.
  • The model must accept a matching picture. The tenant’s model pool needs an image-capable model whose limits admit the image before the picture itself reaches the answer. Attach documents covers setup, limits, and the result when no configured model can carry it.

Extraction is best effort rather than a fidelity guarantee, especially when meaning is visual. When a document has to be exactly right, extract it yourself and upload the text.

How a page becomes passages

A passage never crosses a page boundary, and a long page can produce several passages. Keeping one logical record on one page therefore prevents a page break from dividing it.

A page with no readable text produces no text passage. If the page contains a picture Duale AI can decode, that picture remains searchable and the document can still reach ready. An extraction failure means Duale AI produced neither searchable text nor a searchable picture, or extraction stopped with the cause that the error details name. Read the status after each upload.

One consequence to design for: a table that breaks across a page becomes two passages that do not share context. Keep one logical record on one page where the source lets you. Best practices covers the other source habits that make a document index well, and Manage libraries covers the upload and the statuses a document moves through.

Use the order of the results

Order carries the signal. Any relevance number beside it does not.

Results come back best first, and that order is the whole of what Duale AI is telling you. A relevance number attached to a result is not a similarity and not a probability, and two different questions do not produce comparable numbers.

So a threshold carried over from another retrieval system does not transfer reliably. Take the first few results in the order they arrive and let the model read them.