Back to Llama Index

LlamaIndex Retrievers Integration: DuckDBRetriever

llama-index-integrations/retrievers/llama-index-retrievers-duckdb-retriever/README.md

0.14.21734 B
Original Source

LlamaIndex Retrievers Integration: DuckDBRetriever

pip install llama-index-retrievers-duckdb-retriever.

What is this?

This is a BM25 Retriever for DuckDB that can be used with LlamaIndex to enable full-text search.

How to use

This was created with reference to DuckDB Full-Text Search Extension, so it's mostly the same.

Please refer to that.

However, while DuckDBVectorStore is an VectorStore, DuckDBRetriever is a Retriever.

DuckDBRetriever Example:

python
from llama_index.retrievers.duckdb_retriever import DuckDBRetriever

retriever = DuckDBRetriever(database_name="vector.db", persist_dir="duckdb")
nodes = retriever.retrieve("retrieve_query")