As an inference pipeline

Antfly as an inference pipeline.

Chunking, embedding, indexing, fusion, and reranking run as stages inside one engine. You just bring your data and pick your model.

Anty with a wrench on a straight pipe, handing a page to an agent while a tangle of pipes fills the wall behind them

Ask for “a spiral galaxy”

One command in the quickstart loads ten thousand Wikipedia articles, pictures included, into a table on your laptop. Antfly reads the pictures with a model that understands words and images together, so nobody has to caption or tag them. Type “a spiral galaxy” and these three come back first. Every search on this page ran against that same table.

  • NGC 2857NGC 2857
  • NGC 1084NGC 1084
  • NGC 2276NGC 2276

Flip the reranker on

Keyword and semantic search each rank the same articles differently, and fusion merges the two lists. A reranker then reads the candidates themselves and scores each one against the question. The switch swaps in the reranked list from the same run.

query

keyword Einstein with semantic “theory of relativity and physics”

  1. 1
    Daniel Q. Posinfound by keyword and semantic
  2. 2
    Felix Piranifound by keyword and semantic
  3. 3
    Gene Federicofound by keyword
  4. 4
    Frederik Belinfantefound by semantic
  5. 5
    Judith Blaufound by keyword
  6. 6
    Harold Horton Sheldonfound by semantic
  7. 7
    Eva J. Engelfound by keyword
  8. 8
    Relativity Televisionfound by semantic

Fused: keyword and semantic results merged by reciprocal rank fusion. Two candidates tie for first.

Pull out the entities

Antfly can also read each document as it arrives and pull out the things it names: people, places, universities, theories. You say which kinds matter to you, and a small extraction model finds them, with no rules to write. Below is the result over sixteen more Wikipedia articles, the introductions of physicists from to . Eight of them share the node, four share , and where one physicist’s introduction names another, the two link directly: to , Bohr to , to and . Store those links in a graph index and a query can walk from one article to the others through what they mention.

Entities and relations extracted from the Wikipedia introductions of sixteen physicistsAlbert EinsteinIsaac NewtonNiels BohrMarie CurieRichard FeynmanPaul DiracWerner HeisenbergErwin SchrödingerMax PlanckWolfgang PauliEnrico FermiStephen HawkingJames Clerk MaxwellMichael FaradayErnest RutherfordJ. Robert Oppenheimerspecial relativityNobel PrizeKaiser Wilhelm Institute …United StatesGermanygeneral relativityPierre Louis MaupertuisAlexis ClairautBohr model of the atomHans KramersOskar Kleinquantum field theoryatomic theoryUniversity of Cambridgequantum mechanicsFermi–Dirac statisticsfermionsMax Bornquantum theorybeta decayneutrinoneutronManhattan ProjectRoger Penroseblack holes
articleentityrelationmentioned in

Hover or click a node. Squares are articles; circles are the names it pulled out of them.

Inside the engine

A retrieval pipeline usually grows one piece at a time: a chunker, an embedding API, a vector index, a keyword engine beside it, and a reranker, each with its own copy of the document ids. In Antfly they are stages of one engine over one set of ids. You keep your sources and your generative model; the rest runs as documents arrive.

The pipeline: as documents arrive, and when a question comes inANTFLYAS DOCUMENTS ARRIVEWHEN A QUESTION COMES INYOUR SOURCEStextPDFimageaudiochunkembedextractindexesa questionkeyword + vectorfusererankpruneYOUR MODELagentor LLM
Chunking
Text and multimodal content split for embedding.
Embedding
Local models for text, images, and audio; no per-request API.
Extraction
An extraction model (GLiNER2) pulls the people, places, and dates a document names into typed fields you can filter and aggregate on.
Indexing
Full-text, vector, graph, and typed values on the same documents.
Fusion
Keyword and vector results merged by rank or by score.
Reranking
A cross-encoder scores the candidates in one batched call.
Pruning
The weak tail is dropped before the result leaves the engine.

Change the model, keep the table

Chunks, embeddings, transcripts, and extracted entities are artifacts derived from the source document, and any index can build from them. Swap the embedder and the engine re-embeds from the stored chunks; you never re-insert a document to change the embedder. Each index reports its own readiness, and a document whose enrichment failed is listed as failed until it is reprocessed.

Inputs

Text and JSON
Inserted directly or by URL.
PDFs
Born-digital parsing, with OCR for pages that carry no text.
Images
CLIP-style embeddings, so a text query can return an image.
Audio
Whisper transcribes it, and the transcript is searched as text.
Next
Multimodal guide

Index a PDF, an image, and a recording.

The multimodal guide creates the table, names the models, and runs a text query that returns an image.

Build a pipeline