An open API service indexing awesome lists of open source software.

https://github.com/wdopen-nk/rag-ai-agent

A scalable Retrieval-Augmented Generation (RAG) AI agent powered by Qdrant vector search, OpenAI, and FastAPI — featuring async workflows with Inngest and an interactive Streamlit UI.
https://github.com/wdopen-nk/rag-ai-agent

fastapi inngest openai openai-api qdrant qdrant-vector-database streamlit

Last synced: 9 days ago
JSON representation

A scalable Retrieval-Augmented Generation (RAG) AI agent powered by Qdrant vector search, OpenAI, and FastAPI — featuring async workflows with Inngest and an interactive Streamlit UI.

Awesome Lists containing this project

README

          

# Retrieval-Augmented Generation (RAG) AI Agent

A scalable Retrieval-Augmented Generation (RAG) AI system using LlamaIndex, Qdrant, and OpenAI to deliver context-aware responses.

## Overview

This project implements a Retrieval-Augmented Generation (RAG) pipeline that combines vector search with LLMs to provide accurate, grounded responses. It uses LlamaIndex for orchestration, Qdrant for vector storage, and OpenAI for response generation. The system is designed to be modular, scalable, and production-ready.

## Features

- Semantic search over custom PDFs
- Context-aware AI responses
- Fast API backend
- Async workflows
- Dockerized vector database
- Interactive frontend UI

## Architecture

User (Streamlit UI)

FastAPI Backend

LlamaIndex Query Engine

Qdrant Vector Search

OpenAI LLM

Response

## Tech Stack

| Layer | Technology |
| ------------- | ---------- |
| RAG Framework | LlamaIndex |
| Backend | FastAPI |
| Frontend | Streamlit |
| Vector DB | Qdrant |
| LLM | OpenAI |
| Workflows | Inngest |
| Infrastructure | Docker |

## Getting started

### Run the following commands in terminal of your favorite IDE :

1. Clone the repository

- `git clone https://github.com/wdopen-nk/rag-ai-agent.git`
- `cd rag-ai-agent`

2. Setup environment

- `uv init .`
- `uv add fastapi inngest llama-index-core llama-index-readers-file python-dotenv qdrant-client uvicorn streamlit openai`

3. Start Qdrant (Docker)

- First, create a folder in the working directory named `qdrant_storage`

- `docker run -d --name qdrantRagDB -p 6333:6333 -v "$(pwd)/qdrant_storage:/qdrant/storage" qdrant/qdrant`

- Make sure that `Docker` is installed on your device before running the above command.

4. Set environment variables

- Make sure `.env` file contains the actual key from your OpenAI LLM.

5. Run the backend

- `uv run uvicorn main:app`
- `npx inngest-cli@latest dev -u http://127.0.0.1:8000/api/inngest --no-discovery` for connecting to the inngest server.
- Make sure that `Node.js` is installed on your device before runnig the above command.

6. Run the frontend

- `uv run streamlit run streamlit_app.py`

## License

This project is licensed under the MIT license.