Prompt Chain

Enhance RAG Retrieval Accuracy with DeepMemory

A LlamaIndex pack that inserts data into DeepLake and instantiates a DeepMemory retriever for RAG applications.

Works with deeplakellama index

57
Spark score
out of 100
Updated 4 days ago
Version 0.14.22
Models

Add to Favorites

Why it matters

Boost the recall of your Retrieval Augmented Generation (RAG) system by leveraging DeepMemory's advanced retrieval capabilities. This pack integrates your data into DeepLake, enabling more accurate information retrieval for your AI applications.

Outcomes

What it gets done

01

Integrate data into DeepLake for enhanced storage and retrieval.

02

Instantiate a DeepMemory retriever for improved RAG performance.

03

Increase retrieval accuracy and recall in your AI applications.

04

Utilize the pack via CLI or direct Python code integration.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/li-pack-packs-deeplake-deepmemory-retriever | bash

Steps

Steps in the chain

01
Download DeepMemoryRetrieverPack

Use llamaindex-cli to download the DeepMemoryRetrieverPack: llamaindex-cli download-llamapack DeepMemoryRetrieverPack --download-dir ./deepmemory_pack

02
Import and download pack via Python

Download the pack to a ./deepmemory_pack directory using: from llama_index.core.llama_pack import download_llama_pack; DeepMemoryRetriever = download_llama_pack('DeepMemoryRetrieverPack', './deepmemory_pack')

03
Setup pack arguments

Prepare nodes and metadata information for the pack initialization

04
Create the pack instance

Instantiate DeepMemoryRetriever with dataset_path, overwrite flag, and nodes: deepmemory_pack = DeepMemoryRetriever(dataset_path='llama_index', overwrite=False, nodes=nodes)

05
Run queries using the pack

Use the run() function to query: response = deepmemory_pack.run('Tell me a bout a Music celebritiy.')

06
Use retriever module individually

Access the retriever directly: retriever = deepmemory_pack.retriever; nodes = retriever.retrieve('query_str')

07
Use query engine module individually

Access the query engine directly: query_engine = deepmemory_pack.query_engine; response = query_engine.query('query_str')

Overview

DeepLake DeepMemory Pack

What it does

DeepMemoryRetrieverPack

How it connects

When you want to use DeepLake's DeepMemory feature with LlamaIndex for retrieval-augmented generation

Source README

Description pending for li-pack-packs-deeplake-deepmemory-retriever.

Step 1: Download DeepMemoryRetrieverPack

Use llamaindex-cli to download the DeepMemoryRetrieverPack: llamaindex-cli download-llamapack DeepMemoryRetrieverPack --download-dir ./deepmemory_pack

Step 2: Import and download pack via Python

Download the pack to a ./deepmemory_pack directory using: from llama_index.core.llama_pack import download_llama_pack; DeepMemoryRetriever = download_llama_pack('DeepMemoryRetrieverPack', './deepmemory_pack')

Step 3: Setup pack arguments

Prepare nodes and metadata information for the pack initialization

Step 4: Create the pack instance

Instantiate DeepMemoryRetriever with dataset_path, overwrite flag, and nodes: deepmemory_pack = DeepMemoryRetriever(dataset_path='llama_index', overwrite=False, nodes=nodes)

Step 5: Run queries using the pack

Use the run() function to query: response = deepmemory_pack.run('Tell me a bout a Music celebritiy.')

Step 6: Use retriever module individually

Access the retriever directly: retriever = deepmemory_pack.retriever; nodes = retriever.retrieve('query_str')

Step 7: Use query engine module individually

Access the query engine directly: query_engine = deepmemory_pack.query_engine; response = query_engine.query('query_str')

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.