Algebraic method lets AI agents combine search steps on demand

Algebraic Retrieval: Composable Search for Agents

Information Retrieval

Summary

It's hard for AI systems to search with many different rules at the same time. The authors created a way for AI agents to mix and match search rules like ranking, eligibility, and relevance using math. This lets the AI change how it searches depending on the question, and double-check or adjust results. They tested this by comparing different math-based and database methods and found they pick the same documents almost exactly.

What this means in practice

  • For search engine developers: Create flexible search queries that combine ranking and filtering dynamically for better tailored results.
  • For enterprise data teams: Combine multiple search constraints programmatically in one query to improve document retrieval workflows.

Authors

Damian Delmas

Abstract

Algebraic Retrieval lets AI agents compose search strategies at query time. Relevance criteria, eligibility constraints, and ranking preferences can be expressed together in a mathematical query. The query surface exposes available operations, so an agent can combine them for the question at hand and revise a program after inspecting results. We evaluate execution parity, not agent behavior or retrieval quality. Building on Programmatic Embedding Modulation (PEM), which exposes vector and score arithmetic during retrieval, we demonstrate contrastive scoring, candidate-pool reranking, and weighted ranking as composable queries, alongside executable SQL and PyTerrier counterparts. On the public 11,429-document Vaswani fixture, each program's implementations select the same document set with score differences below 1e-6; one tied pair orders differently across scoring paths.