elips/docs
Chapter V · the query layer

EQL — the ELIPS Query Language

Reach for EQL when filter dicts stop being expressive enough. It compiles to the same QueryPlan the SDKs use.

Statement grammar

text
seek in <vault>
    nearest <[literal] | $binding>
    [top <int>]
    [threshold <number>]
    [where <filter>]
    [rank_by <distance | field>]
    [project <* | f1, f2, ...>]
    yield

fetch from <vault> id "<uuid>" yield
scan in <vault> [where ...] [offset N] [limit N] yield
place in <vault> vector [...] [data {...}]
erase from <vault> id "<uuid>"

Filter grammar

text
filter   := term (("and" | "or") term)* | "not" filter | "(" filter ")"
term     := field <comparator> value
          | field "in" [ value, ... ]
          | field "contains" "substring"
comparator := = | != | < | <= | > | >=

Run from Python

python
db.query("""
  seek in articles
    nearest $embedding
    top 10
    where category = "technology" and published_year >= 2023
    project title, author
    yield
""", bindings={"embedding": embed(query)})

Run from the CLI

bash
elips query /my_db --eql 'seek in docs nearest [0.1,0.2,0.3] top 5 yield'
elips query /my_db --file ranking.eql