> ## Documentation Index
> Fetch the complete documentation index at: https://docs.odella.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Research AI Block

> Leverage AI to conduct intelligent research across public or private document stores

## Overview

The Research AI Block utilizes advanced AI capabilities to perform intelligent searches and research across multiple document stores. This block can search through public databases, private collections, or a combination of both, providing powerful and flexible research capabilities for various use cases.

<Frame>
  <img src="https://mintcdn.com/odella/PGZ7enNCqh0mvwj_/block-reference/assets/research_ai_light.png?fit=max&auto=format&n=PGZ7enNCqh0mvwj_&q=85&s=520a1ace4e54343b5e282409e0b89e18" alt="Research AI Block Screenshot" className="block dark:hidden" width="912" height="426" data-path="block-reference/assets/research_ai_light.png" />

  <img src="https://mintcdn.com/odella/PGZ7enNCqh0mvwj_/block-reference/assets/research_ai_dark.png?fit=max&auto=format&n=PGZ7enNCqh0mvwj_&q=85&s=c71097338a044b80cf6e8394fa1fdd3a" alt="Research AI Block Screenshot" className="hidden dark:block" width="910" height="452" data-path="block-reference/assets/research_ai_dark.png" />
</Frame>

## Inputs

<ParamField path="Question" type="string | chat-message | chat-message[] | string[]" required>
  The question or questions to research. Required. This guides the AI in conducting the research. Can be provided as a string, chat message, array of chat messages, or array of strings.
</ParamField>

## Outputs

<ResponseField name="Question" type="string">
  The question that was researched.
</ResponseField>

<ResponseField name="Answer" type="string">
  The answer to the research question.
</ResponseField>

<ResponseField name="Sources" type="object[]">
  The cited sources supporting the response.
</ResponseField>

<ResponseField name="All" type="string">
  A combined output containing the question, answer and discovered sources.
</ResponseField>

<ResponseField name="Duration" type="number">
  The time in milliseconds that the block took to execute.
</ResponseField>

## Editor Settings

<ParamField path="Document Store" type="string[]">
  Select up to 5 document stores to search over. The available options are dynamically populated based on your configured document stores.
</ParamField>

<ParamField path="Mode" type="string" default="OR">
  How to combine the search results across multiple document stores:

  * OR: Routes to the most relevant store
  * AND: Combines results from all stores
</ParamField>

<Note>
  A DocumentStoreProvider must be configured to use this block.
</Note>

## Error Handling

The block will retry failed attempts up to 3 times with exponential backoff:

* Minimum retry delay: 500ms
* Maximum retry delay: 5000ms
* Retry factor: 2.5x
* Includes randomization
* Maximum retry time: 5 minutes

Error messages will be logged for:

* No document stores selected
* Invalid document store IDs
* Missing DocumentStoreProvider configuration
* API rate limits (will retry)
* API timeouts (will retry)
* Other API errors

<Warning>
  Always verify the accuracy and relevance of the research results, especially when using them for critical decision-making or legal purposes.
</Warning>

## FAQ

<AccordionGroup>
  <Accordion title="How does the Research AI block handle conflicting information from different sources?">
    The AI attempts to reconcile conflicting information by analyzing the credibility of sources, considering the recency of information, and providing context for discrepancies. In cases of significant conflicts, the AI may highlight these differences in the research results.
  </Accordion>

  <Accordion title="Can I use the Research AI block with my own private document stores?">
    Yes, the Research AI block can be configured to work with both public and private document stores. Ensure that your private stores are properly set up and accessible within your platform environment.
  </Accordion>

  <Accordion title="How does the 'OR' search mode differ from the 'AND' mode?">
    In 'OR' mode, the AI intelligently selects the most appropriate document store to search based on the query, potentially improving speed and relevance. In 'AND' mode, the AI searches all specified stores and combines the results, providing a more comprehensive but potentially slower search.
  </Accordion>
</AccordionGroup>

## See Also

* [Ask AI Block](/block-reference/ai/ai)
* [AI Filter Block](/block-reference/ai/ai-filter)
* [Analyze Table Block](/block-reference/ai/analyze-table)
