LOTUS
LOTUS, from Stanford University and UC Berkeley, introduced and optimizes semantic operators.
Verified
Core facts
Read by a script from the official API, not rewritten by a model.
- Repository
- https://github.com/lotus-data/lotus
- License
- Apache-2.0
- Languages
- Python
- Maintainer
- lotus-data
- Homepage
- https://lotus-data.github.io
- Verified
What it is
LOTUS stands for LLMs Over Text, Unstructured and Structured Data. LOTUS comes from Stanford University and UC Berkeley. LOTUS introduced and optimizes semantic operators.
Semantic operators let you process large datasets with LLMs and natural language instructions. The project says that LOTUS makes agentic and LLM bulk processing fast, easy, and robust, which is the project's own description of what the tool offers to its users.
Main features
Each semantic operator implements an LLM-based transformation over a dataset.
A semantic operator is specified with a natural language instruction, and its operations can be transparently optimized.
LOTUS supports two classes of semantic operators.
Agentic operators run tool-using agents over a corpus.
LLM operators include sem_map, sem_filter, sem_agg, sem_join, sem_extract and others.
The project says it optimizes semantic operators for higher accuracy and lower cost.
The project reports that across diverse tasks, its optimized pipelines match or exceed the accuracy of high-quality baselines while running substantially faster and cheaper than those baselines.
Getting started
In the Quickstart, you give LOTUS a corpus and a task.
In the Quickstart, LOTUS shards the corpus and spawns an agent per shard.
In the Quickstart, each agent has a sandboxed Python REPL for exact computation.
In the Quickstart, after an agent runs on each shard, LOTUS reduces the per-shard findings into one answer for the corpus and the task that were given.
pip install lotus-aiimport lotus
from lotus.models import LM
from lotus.tools import PythonREPLTool
# Configure the LM — export your API key first (e.g. export OPENAI_API_KEY=sk-...)
lotus.settings.configure(lm=LM(model="gpt-5", reasoning_effort="low"))
# A corpus can be inline documents, a DataFrame, files, or one large text.
# Here: a few small functions, some of them subtly buggy.
snippets = [
"def average(nums): return sum(nums) / (len(nums) - 1)",
"def word_count(s): return len(s.split())",
"def percent(part, whole): return part / whole",
"def reverse(s): return s[::-1]",
]
corpus = lotus.Corpus.from_documents(snippets)
# Each agent actually *runs* its function in a sandboxed REPL to find bugs —
# then LOTUS reduces the per-function results into one report.
result = corpus.agent(
task="Test each function on example inputs and report which ones are buggy, "
"with a counterexample for each bug.",
ops=["map", "reduce"], # compose agentic ops: map, filter, reduce
tools=[PythonREPLTool()],
)
print(result.output) # the reduced bug reportWho it is for
You express what you want over a dataset using high-level semantic operators. The LOTUS optimizer decides how to run the work, including batching calls. In deciding how to run the work, the LOTUS optimizer is also described as applying model cascades and proxies, and lazily planning the whole pipeline.
Deep research and synthesis involves fanning out over a corpus, extracting, and synthesizing. Agent-trace failure analysis mines large volumes of agent logs for failure modes. Document extraction and unstructured analysis produce structured fields and insights from text.
LLM-judge evals score model outputs, app responses, and content quality, row by row. RAG retrieves the relevant context and generates grounded answers over your data.
Sources
This page is written from the official sources below. Open them to check the original text.
- GitHub READMEhttps://github.com/lotus-data/lotusFetched
Verified ·
This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.