elips/docs
Chapter III · retrieval

Documents, chunks, lineage

add(text=...) embeds, chunks, and stores in one call — and records exactly which model produced each vector. Column form uses documents=/metadatas= for batches.

python
docs = client.get_or_create_collection("documents")
docs.add(
    text="Long markdown article ...",
    metadata={"kind": "design"},
)

for hit in docs.query(query_texts="alpha", n_results=3):
    print(hit.text[:80])
    print(hit.meta)
    print(hit.document.uri if hit.document else None)

Lineage is what lets you re-embed only the records produced by a stale model. It's also what powers exact citations.