Back to directory

LOTUS: Optimized Agentic and LLM Bulk Processing

A Python library from Stanford and Berkeley that adds LLM-based map, reduce and filter operators to bulk-process large datasets with agents, optimizing for accuracy and cost.

LOTUS: Optimized Agentic and LLM Bulk Processing

LOTUS, which stands for LLMs Over Text, Unstructured and Structured Data, introduces semantic operators, LLM-based versions of map, reduce and filter, that let a developer process large datasets with natural-language instructions instead of hand-written logic for each row. Its optimizer decides how to run these operators efficiently: batching calls, applying model cascades and proxies, and planning the whole pipeline lazily for higher accuracy at lower cost.

Typical uses include running a sandboxed, tool-using agent over every file or record in a codebase and reducing the results to one answer, fanning out over a document corpus for research and synthesis, mining agent logs for failure patterns, extracting structured fields from unstructured text, scoring model outputs for evaluation, and retrieval-augmented generation. It installs from PyPI as lotus-ai, and shards a corpus, runs an agent per shard in parallel with its own sandboxed Python interpreter, and reduces the per-shard findings into a single answer.

More in Data engineering

See all 98
  • ppgrid

    mrzk.io

    An open-source tool that turns tens of millions of point-data rows into a smooth, adaptive-resolution raster in seconds, using a push-pull mipmap approximation of inverse distance weighting that stays fast as the dataset grows.

  • Scope Lineage

    github.com

    An offline static analyzer that turns Spark and Hive SQL into structured, versioned column-lineage and diagnostics files, so AI agents and knowledge bases can reason from addressable, checkable facts instead of guessing from raw SQL.

  • A pair of Colab notebooks demonstrating a retrieval-augmented generation workflow for extracting structured datasets from scientific paper abstracts, applied here to hydrogen-storage properties of metal alloys and hydrides.