Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ Weaviate for cool machine-learning related tasks.
| [Workshop Question Answering](question-answering-application-with-weaviate-workshop) | Python notebook | Jupyter/Colab notebook to learn how to get started with Question Answering and Weaviate, given at [Knowledge Graph Conference (KGC) 2022](https://www.knowledgegraph.tech/kgc-2022-tutorial-ml-model-with-the-vector-database-weaviate/) |
| [Attendance system using image2vec-neural and own vectors](attendance-system-example) | Python |This example uses image2vec-neural and has an option to use own vectors using OpenCV. It is a smart attendance system example|
| [Monitoring Setup with Prometheus & Grafana](monitoring-prometheus-grafana) | yaml | This example does not describe any use case, but rather shows a way of how to start, operate and configure Weaviate with Prometheus-Monitoring and a Grafana Instance with some sample dashboards. |
| [AG2 Multi-Agent RAG with Weaviate](ag2-multiagent-rag) | Python (Jupyter Notebook) | Multi-agent RAG using [AG2](https://ag2.ai/) (formerly AutoGen) with Weaviate as the vector store. AG2 agents collaborate to retrieve and synthesize information via semantic search. |
53 changes: 53 additions & 0 deletions ag2-multiagent-rag/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# AG2 Multi-Agent RAG with Weaviate

This example demonstrates how to use [AG2](https://ag2.ai/) (formerly AutoGen)
multi-agent conversations with [Weaviate](https://weaviate.io/) for
Retrieval-Augmented Generation (RAG).

## Overview

Two AG2 agents collaborate to answer questions using documents stored in Weaviate:

- **Research Agent** retrieves relevant documents via Weaviate semantic search
- **Analyst Agent** synthesizes the information into comprehensive answers

## Prerequisites

- Python >= 3.10
- OpenAI API key

## Quick Start

```bash
pip install "ag2[openai]>=0.11.4,<1.0" weaviate-client
```

Set your API key:

```bash
export OPENAI_API_KEY="your-api-key"
```

Run the notebook:

```bash
jupyter notebook ag2_multiagent_rag_with_weaviate.ipynb
```

Or open directly in Google Colab:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/weaviate/weaviate-examples/blob/main/ag2-multiagent-rag/ag2_multiagent_rag_with_weaviate.ipynb)

## Tech Stack

- [AG2](https://ag2.ai/) — Multi-agent conversation framework (500K+ monthly PyPI downloads)
- [Weaviate](https://weaviate.io/) — Open-source vector database
- [Weaviate Embedded](https://weaviate.io/developers/weaviate/connections/connect-embedded) — In-process mode (no Docker needed)
- [text2vec-openai](https://weaviate.io/developers/weaviate/model-providers/openai/embeddings) — Automatic embedding generation

## How It Works

1. Documents are indexed into Weaviate (auto-embedded via `text2vec-openai`)
2. AG2 Research Agent uses a registered `search_documents` tool to query Weaviate
3. AG2 Analyst Agent synthesizes retrieved information into grounded answers
4. Agents collaborate via AG2 GroupChat with automatic tool execution
Loading