RAG with LlamaIndex x Desearch
RAG with LlamaIndex x Desearch
Add Desearch retrieval to a LlamaIndex agent: register Desearch's search tool as a retriever, then set up an OpenAI Agent that uses it.
Quick Start
1. Install Required Packages
bash
2. Instantiate the Desearch Tool
Set the DESEARCH_API_KEY environment variable first. Get a key at Desearch.
python
3. Select Desearch Methods to Use
This example passes only the ai_search_tool method to the agent, using the .to_tool_list method:
python
4. Set Up the OpenAI Agent
python
Use the chat method to interact with the agent:
python
Desearch Tool Functions
ai_search_tool: AI-powered search across multiple sources, including web pages, research papers, and social media.twitter_search_tool: retrieves links and tweets matching a search query, without AI models.web_search_tool: plain web search, like a normal search engine.
For more details, see the Desearch Tool API Reference.