LlamaIndex retriever integration for Dewey — managed RAG backend
Project description
LlamaIndex Dewey Retriever
Dewey is a managed document intelligence backend that handles the full RAG pipeline — PDF conversion, section extraction, chunking, embedding, and hybrid retrieval — behind a single REST API.
This package provides a DeweyRetriever that integrates Dewey's hybrid semantic + BM25 search directly into LlamaIndex pipelines.
Installation
pip install llama-index-retrievers-dewey
Usage
from llama_index.retrievers.dewey import DeweyRetriever
from llama_index.core.query_engine import RetrieverQueryEngine
from llama_index.llms.anthropic import Anthropic
retriever = DeweyRetriever(
api_key="dwy_live_...", # Dewey project API key
collection_id="3f7a1b2c-...", # Collection to search
k=8, # Number of chunks to retrieve
)
# Use with any LlamaIndex query engine
query_engine = RetrieverQueryEngine.from_args(
retriever=retriever,
llm=Anthropic(model="claude-haiku-4-5-20251001"),
)
response = query_engine.query("What are the main findings?")
print(response)
Direct retrieval
nodes = retriever.retrieve("attention mechanism scaling")
for n in nodes:
print(f"[{n.score:.3f}] {n.node.metadata['filename']} › {n.node.metadata['section_title']}")
print(f" {n.node.text[:120]}...")
As part of an agent
from llama_index.core.tools import RetrieverTool
from llama_index.core.agent import ReActAgent
from llama_index.llms.openai import OpenAI
tool = RetrieverTool.from_defaults(
retriever=retriever,
description="Search AI research papers for relevant information.",
)
agent = ReActAgent.from_tools([tool], llm=OpenAI(model="gpt-4o-mini"), verbose=True)
agent.chat("Compare the Transformer and RAG architectures.")
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key |
str |
required | Dewey project API key (dwy_live_...) |
collection_id |
str |
required | UUID of the collection to search |
k |
int |
10 |
Max chunks to retrieve (1–50) |
base_url |
str |
https://api.meetdewey.com/v1 |
Override for local dev |
What Dewey returns
Each retrieved node includes:
node.text— chunk contentnode.metadata["filename"]— source document filenamenode.metadata["section_title"]— section headingnode.metadata["section_level"]— heading depth (1 = top-level)node.metadata["document_id"]— document UUIDnode.metadata["section_id"]— section UUIDscore— relevance score from hybrid RRF ranking
Resources
- Dewey documentation
- Free tier signup — no credit card required
- Python SDK (
meetdewey)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_retrievers_dewey-0.1.0.tar.gz.
File metadata
- Download URL: llama_index_retrievers_dewey-0.1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
374440573d3c249c77be9b7ba5c8a857e540e8618609bf43fbe891e0ad9b16fb
|
|
| MD5 |
29f09b33294235507d313c496c78efde
|
|
| BLAKE2b-256 |
28d9f7ec26bbce1f105b9973c17c098212e628b167d26ee0bfb95b9c6702e385
|
File details
Details for the file llama_index_retrievers_dewey-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_retrievers_dewey-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b99d6b704f27c998c2a3c7f2d4f1044a1b41ddf29e3e1b5350832902f6b111a
|
|
| MD5 |
b9e351e2d60a756858b675a241fa2c84
|
|
| BLAKE2b-256 |
acf7571add3d590aac86c31f89b6d9504c3426b4c4892de5e55471c54eb038cc
|