Skip to main content

Embedding-Less retrieval with Iterative Text Exploration (ELITE)

Project description

arXiv

ELITE: Embedding-Less retrieval with Iterative Text Exploration

Large Language Models (LLMs) have achieved impressive progress in natural language processing, but their limited ability to retain long-term context constrains performance on document-level or multi-turn tasks. Retrieval-Augmented Generation (RAG) mitigates this by retrieving relevant information from an external corpus. However, existing RAG systems often rely on embedding-based retrieval trained on corpus-level semantic similarity, which can lead to retrieving content that is semantically similar in form but misaligned with the question's true intent. Furthermore, recent RAG variants construct graph- or hierarchy-based structures to improve retrieval accuracy, resulting in significant computation and storage overhead. In this paper, we propose an embedding-free retrieval framework. Our method leverages the logical inferencing ability of LLMs in retrieval using iterative search space refinement guided by our novel importance measure and extend our retrieval results with logically related information without explicit graph construction. Experiments on long-context QA benchmarks, including NovelQA and Marathon, show that our approach outperforms strong baselines while reducing storage and runtime by over an order of magnitude.

Table of Contents

Features

  • Embedding-Free Retrieval: Eliminates the reliance on embedding models and dense retrievers.

  • Fast Response & Deployment: Minimal offline preparation and indexing time enables fast responses and rapid deployment.

  • Lightweight Reasoning: Utilizes LLMs’ native lexical and reasoning abilities—no need to construct graph or tree databases.

  • Strong Performance: Outperforms baselines on long-context QA benchmarks such as NovelQA and Marathon.

Project Structure

  • src/: Core implementation of the embedding-free RAG framework.
  • reproduce/: Scripts for reproducing experiments.
  • demo.py: A runnable demo to test the pipeline.
  • requirements.txt: List of dependencies.
  • .gitignore: Standard ignored files.
  • Readme.md: Project documentation.

🔧 Installation & Quick Start

Environment setup

# Clone the repository
git clone https://github.com/tjzvbokbnft/ELITE-Embedding-Less-retrieval-with-Iterative-Text-Exploration.git
cd ELITE-Embedding-Less-retrieval-with-Iterative-Text-Exploration

# Create & activate a clean conda env (Python 3.11)
conda create -n ELITE python=3.11 -y
conda activate ELITE

# Install core dependencies
pip install -r requirements.txt

Quick demo

#string_noise --> optional (To use this package, you must manually add it to your site-packages directory.
#If you don't need it, simply delete the related code. -->using without the importance metric)

#play with demo
#config your txt path in demo.py
#config other parameters in scr/local_config.py

python demo.py

Benchmark reproduction

# Reproduce on NovelQA benchmark
python reproduce/test_novelQA.py

# Reproduce on Marathon benchmark
python reproduce/test_marathon.py

Command-line interface (CLI)

# Minimal run (uses default novel path)
python cli_agent.py
# Change only the model & neighbor count
python cli_agent.py --common_model llama3.1:latest --neighbor_num 2
# Full control
python cli_agent.py \
  --novel nvQA/Frankenstein.txt \
  --recall_index 6 \
  --neighbor_num 15 \
  --deep_search_index 4 \
  --deep_search_num 25 \
  --voter_num 5 \
  --num_ctx 10000 \
  --common_model llama3.1:latest

Use as an API

from pathlib import Path
from src import core_functions

# 1️⃣  Load text
context = Path("nvQA/Frankenstein.txt").read_text(encoding="utf-8")

# 2️⃣  Bootstrap cache & query
keywords_cache = ""        # Empty on first call
question       = "What motivates Victor to create life?"

# 3️⃣  Retrieve
resp = core_functions.retrieve_useful(
    text_input=context,
    query=question,
    cached_keywords=keywords_cache,
)

# 4️⃣  Grab results
relevant_text   = resp["retrieve_data"]
new_keywords    = resp["keywords_extracted"]
keywords_cache += new_keywords      # accumulate for next round

print(relevant_text)
print("Newly mined keywords:", new_keywords)

Framework

framework

Performance Analysis

QA Retrieval Accuracy

QA Retrieval Accuracy

Average Query Time by Context Length and Query Volume

Average Query Time

Total Time Consumption by Context Length

Total Time Consumption

📄 How to Get Results on NovelQA and Marathon

📊 Benchmark & Evaluation

To evaluate the performance of this framework on NovelQA and Marathon, please follow the official benchmarking instructions:

📘 NovelQA

🏃 Marathon

License

  • MIT

Citation

If ELITE assists in your research, please cite us:

@misc{wang2025elite,
  title     = {ELITE: Embedding-Less Retrieval with Iterative Text Exploration},
  author    = {Wang, Zhangyu and Gao, Siyuan and Zhou, Rong and Wang, Hao and Ning, Li},
  year      = {2025},
  eprint    = {2505.11908},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CL},
  url       = {https://arxiv.org/abs/2505.11908}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eliterag-0.1.1.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eliterag-0.1.1-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file eliterag-0.1.1.tar.gz.

File metadata

  • Download URL: eliterag-0.1.1.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for eliterag-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b87cea3b1f1a48f1aeae2aa0a0f0a5646fa3be676d4b801468a33f6e7bb71c98
MD5 156c39f9d83472e947725e41af1050c1
BLAKE2b-256 1912a255ac375d0d864623034c7b75667b5576e11c0d8eb1119bf46e39f62b68

See more details on using hashes here.

File details

Details for the file eliterag-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: eliterag-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for eliterag-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b03a917d66ec92f23c1be7ab41c48a6acadef0d48e16977373b264178203718
MD5 15a103b4247d3a12bc5494aeca1375a1
BLAKE2b-256 18a8cacb2d012e21bc3d5f5aca96d23a18342982e88750f4a8ded8202c52a86b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page