0:00
/
0:00

[Hands-on] Agentic RAG Using DeepSeek-R1

...powered by CrewAI and FireCrawl.

Make your RAG application 10x smarter!

ColiVara is a unique document retrieval method that does not need chunking or text processing.

It still feels like RAG but without OCR, text extraction, broken tables, or missing images.

ColiVara GitHub

Here’s why it’s powerful:

  • Vision-based indexing

  • 100+ file format support

  • Seamless local or cloud quickstart

  • State-of-the-art multimodal retrieval

  • APIs & SDKs for both Python/TypeScript

  • Late-interaction embeddings for extra accuracy

  • No vector DB management (pgVector under the hood)

Check out the GitHub repo here: ColiVara GitHub.

Thanks to ColiVara for partnering with us on today’s newsletter issue!


Agentic RAG with DeepSeek

DeepSeek-R1 delivers OpenAI-o1 level intelligence at 90% less cost.

We built an agentic rag app that searches your docs and falls back on web search if needed.

The video above tests both cases.

Here’s our tech stack:

  • CrewAI for agent orchestration.

  • FireCrawl for web search.

  • DeepSeek-R1 as the LLM.

The architecture diagram below illustrates the key components & how they interact with each other!

The code is linked towards the end of the issue.

Let’s build it.


1) Setup the LLM

CrewAI nicely integrates with all the popular LLMs and providers out there! Here's how we set up a local DeepSeek model:

2) Setup tools

Our app uses two tools:

  1. Qdrant—vector search tool.

  2. FireCrawl—web search tool.

The code below implements some parts of this tooling:

You would need a FireCrawl API key to search the internet. You can get it here: FireCrawl API key.

3) Define Retriever Agent

The retriever agent is responsible for retrieving the right context for the user query and is assigned a task to do so. Here's how it's done:

4) Define Response Gen Agent

The Response Gen Agent takes the user query and context provided by the retriever agent and generates a response:

5) Setup Crew

Once we have the agents and their tasks defined, we put them in a crew that is orchestrated using CrewAI.

6) Kickoff and results

Finally, we provide the user query and kickoff the crew!

Done!

Further reading:

You can find all the code and instructions to run in this GitHub repo: Agentic RAG code.

We launched this repo recently, wherein we’ll publish the code for such hands-on AI engineering newsletter issues.

This repository will be dedicated to:

  • In-depth tutorials on LLMs and RAGs.

  • Real-world AI agent applications.

  • Examples to implement, adapt, and scale in your projects.

Find it here: AI Engineering Hub (and do star it).

👉 Over to you: What other topics would you like to learn about?

Thanks for reading!