How Search Works
Every substantive claim the agent writes is grounded in papers from your own libraries. This page explains how that grounding works under the hood, from indexing a PDF to turning a question into cited claims, along with best practices.
In AI terms, this design is called retrieval-augmented generation (RAG): the agent first searches your papers for relevant passages, then writes only from what it found. The rest of this page calls those two steps search and writing.
The principle: grounded synthesis, not free generation
Agent Bayes is built on a simple principle. Every claim should be grounded in specific evidence, because accuracy cannot be compromised in academic research. Each claim the agent writes carries a self-aware confidence score that reflects the strength of its supporting sources. Multiple viewpoints are considered and nuance is preserved, so the resulting output participates in the scholarly discussion rather than collapsing it into a single perspective.
How does the agent generate grounded synthesis?
- The agent works in a multi-role pipeline that searches first, then synthesizes claims, then verifies them and identifies gaps. This loop repeats, refining the output and closing gaps until no further improvement can be made.
- If the agent cannot find anything relevant in your libraries, it will not invent an answer. It will tell you it came up empty.
- When building arguments (if you instruct it to do so, e.g. by saying "Argue for ..."), the agent writes continuous prose as a set of mindmap nodes that interleaves conclusions and interpretations with the evidence and scholarly viewpoints. These interpretations are clearly noticeable, so you can review them and verify they rest on evidence that was presented earlier.
- Every node on the mindmap that is grounded with citations is marked green and has citation badges. Nodes that are not grounded in any source are marked gray and have no badges.
Indexing: how documents become searchable
When you upload a PDF to a library, it goes through these indexing steps:
- Text Extraction. Rather than trusting the PDF's built-in text layer, the pipeline performs its own high-quality text extraction that correctly handles multi-column layouts, data tables, equations, and figures. Scanned pages are processed with a custom OCR pipeline. The result is clean and accurately reflects what was on the page.
- Splitting into passages. Most AI search tools slice text into fixed-size windows of characters, which the technical literature calls chunks. This is fast but produces incoherent fragments. A fragment might start mid-argument and end mid-sentence, mixing unrelated ideas. The result is a noisy index where important claims are buried and search becomes inefficient. Agent Bayes groups text into semantically cohesive passages instead, following the natural boundaries of an argument or explanation even when they span a page boundary or several columns. Each passage contains one complete, coherent part of a document, so the later steps can work with it as a meaningful unit.
- Context rebuilding. Each passage is paired with a generated context, a compact summary of the surrounding material, so the passage's original text can be understood in isolation without losing its meaning. This context travels with the passage through search and into synthesis, and you can examine or view it yourself.
- Idea and claim extraction. The passage, together with its context, is broken down into bullet points in English, each capturing a single idea, claim, or piece of evidence. These become the primary units the agent searches and reasons over. Even if the original document is not written in English, this step produces English bullet points, so search and reasoning work the same way across documents in any language.
- Key term extraction. Domain-specific terminology is extracted from each passage and improves search. Once more than ten sources are indexed in the same library, a terminology co-occurrence graph can be produced. These graphs allow the AI agent to understand terms and related concepts, and to disambiguate meanings. You can also explore them in the Terminology Graph Explorer, accessible from the library's page.
- Embedding and indexing. Both the extracted bullet points and the original passage text are converted into vector representations and stored for search by meaning. You can search them yourself on the Search Papers page, and the agent searches them automatically during a workflow.
Note: Indexing is a heavy process that can take several minutes for a 100-page paper, and up to a few hours for long documents with complex layouts (e.g. dissertations). The design decision was to prioritize quality and accuracy of the resulting index over speed, because a noisy index would lead to poor search results and low-quality synthesis. A wise man from the software industry once said: "garbage in, garbage out".
You can watch the indexing progress in real time: Pending → Indexing (with %) → Completed (or Failed / Cancelled).
Search: how a question becomes evidence
When the agent has a research task, either initial broad discovery or a refined follow-up, it runs this sequence:
- Multi-query expansion. It generates roughly ten search queries from the task, each phrased to surface a different angle. This widens coverage, because a single phrasing might miss papers that use different terminology.
- Parallel search. All queries run concurrently against every library attached to the current project. No library is preferred over another. Results pool together.
- Unified re-ranking. All results across all queries are scored together by relevance, citation quality, and cross-task coherence, then deduplicated.
- Viewpoint diversity. The ranker actively looks for opposing or contradictory passages so the synthesis can represent multiple viewpoints instead of averaging them out.
- Synthesis. The agent writes citation-backed claims addressing all tasks in the batch simultaneously, identifying connections and contradictions across them.
- Confidence scoring. Each claim gets a 0–100 score based on source strength.
- Gap identification. The generated claims are checked against your instructions and the evidence found. If a claim doesn't have strong support, or if the instructions aren't fully addressed, those become gaps to be closed in the next loop.
- Coverage assessment. If no new material could be found to close the gaps, the agent flags a potential library limitation.
What you see on the mindmap
The output of all of the above lands on your mindmap as nodes:
- The claim text is what was synthesized.
- The citations attached to the node are the passages the search found.
- Multiple viewpoints become sibling nodes under the same parent.
Searching by hand
You don't have to go through the agent to search your papers. The Search Papers page in a project lets you run searches by hand against the attached libraries, browse the top passages, and label results. See Labeled Items for more information.
What's next
- The Multi-Agent System: who does what in a workflow.
- Libraries: curating the papers the search runs on.