Research turns complex queries into a series of targeted searches, gathers evidence across documents, and produces a grounded answer with source citations.Documentation Index
Fetch the complete documentation index at: https://docs.topk.io/llms.txt
Use this file to discover all available pages before exploring further.
How it works
When you run a Research, TopK:Understands the query
Research interprets the query in context, including the evidence gathered so far.
Searches for relevant evidence
It runs targeted searches across your data to find the most relevant information.
Extracts grounded facts
It pulls out concrete, source-backed facts from each result, preserving citations.
Usage
Research is invoked throughask by setting mode to research.
- CLI
Python SDK
JavaScript SDK
Query:What was the 2022 and 2023 total value of commercial loans modified as TDRs, and the total 90+ days past due for consumer loans at December 31, 2024?Answer:
- Based on exact phrasing matches to corporate filings, the question refers to Bank of America. During 2022, the carrying value of Bank of America’s commercial loans modified as Troubled Debt Restructurings (TDRs) was $1.9 billion. 1
- There is no 2023 value reported, as the TDR reporting designation and accounting guidance were eliminated effective January 1, 2023, upon the adoption of ASU 2022-02. 2
- As of December 31, 2024, Bank of America’s total consumer loans and leases that were 90 days or more past due totaled $2,422 million. 3
- 1 Commercial loans modified as TDRs—2022 carrying value ($1.9 billion) and related commitments and payment-default balances (Bank of America 10-K excerpt)
bank_of_america_2024.pdf p. 127 - 2 ASU 2022-02 eliminated U.S. GAAP troubled debt restructuring reporting; cites year-end 2022 TDR table context (Wells Fargo 10-K excerpt)
wells_fargo_2024.pdf pp. 254–255 - 3 Outstanding consumer loans and leases—90+ days past due ($2,422 million in “Total consumer” rows, December 31, 2024)
bank_of_america_2024.pdf pp. 116–117
Scoping the search
For guidance on:- querying across specific datasets
- applying document filters
- limiting which documents can be considered during retrieval
When to use Research
Use Research for analytical questions that require more than a single retrieval pass to answer reliably. It is intended for multi-hop questions when searching, connecting, comparing, and synthesizing facts is needed to answer the question. Use Research when:- the answer depends on multiple facts from different parts of a document or different documents
- the query requires comparison across years, entities, filings, or sections
- the answer requires complex computation, aggregation, synthesis or resolving intermediate facts
- you care more about depth and correctness than getting the fastest possible answer
summarize mode when:
- the question is direct and likely answered by one or a few passages
- you want the fastest grounded answer
- the extra decomposition and multi-step reasoning are not necessary to reliably answer the question