Pandion
Retrieval pipelines you can inspect, step by step.
Pandion parses your documents, cleans and chunks them, embeds and stores them, then searches, reranks and answers questions. Every step is a strategy you can swap, and every step tells you what it did. Each result is cached under a hash of its settings, so the same files with the same settings are never processed twice.
Pandion is named after the osprey, which spots a fish under the water and dives to retrieve it. It is the engine of RAG Playground, a web app that shows every step of a pipeline on a PDF.
Install
Pandion needs Python 3.13.
pip install "pandion[pdfium,lancedb,local]"
The base install is small. Parsers, stores and models are extras, and a step whose extra is missing tells you which one to install:
| Extra | What it brings | Needed by |
|---|---|---|
pdfium |
pypdfium2 | the fast pdfium parser |
docling |
Docling and its OCR engine | the docling parser, for layout, tables and scans |
lancedb |
LanceDB and pyarrow | the index, and the dense, bm25 and hybrid_rrf search |
local |
sentence-transformers and torch | the local embedders, and the mmr and cross_encoder rerankers |
anthropic |
the Anthropic SDK | llm_rewrite, llm_rerank and chat with Claude |
openai |
the OpenAI SDK | the same steps with OpenAI, OpenRouter or a compatible server |
pandion install pipeline.yaml installs the extras a pipeline file needs.
Quick start
from pandion import Pipeline
p = Pipeline(
path="./my-index",
parse="pdfium",
chunk={"use": "recursive_character", "chunk_size": 400, "chunk_overlap": 40},
embed="bge-small-en-v1.5",
store="lancedb",
search="hybrid_rrf",
answer="search",
)
p.index.run("report.pdf")
print(p.ask("What does the report recommend?").text)
The embedder downloads once, on first use. After that, a second p.index.run on the
same file finds every step already stored and reuses it.
What you can do
- Run one step on its own, with no pipeline and no cache:
pandion.parse(pdf, use="pdfium"),pandion.clean(...),pandion.chunk(...). - Write a pipeline three ways: as a YAML file (
Pipeline.from_file("pipeline.yaml")), as a dict per step, or with classes such asfrom pandion.parse import Docling. The three give the same pipeline and the same cache. - Build and update an index:
p.index.run(files)indexes them, andp.index.sync(folder)adds, changes and removes files to match a folder. - Search:
p.retrieve(question)runs the rewrite, search and rerank steps and returns each step's result as well as the hits. - Ask:
p.ask(question)returns the pieces found, or an answer from a chat model that cites them.
Learn more
- The guide: every step, setting and error.
- Examples: index, sync, search, ask, and the three ways to write a pipeline.
- RAG Playground: try the same pipelines in the browser.
License
MIT. See LICENSE.
Metadata
Release files for pandion 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pandion-0.1.0.tar.gz | 240.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pandion-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 410.9 kB
Release files / pandion-0.1.0.tar.gz
| Download URL | pandion-0.1.0.tar.gz |
|---|---|
| Size | 240.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
114b713347579fa8a92ec105517a686b8f9b3bb8df1a882f5263a3677d7eb4ff
|
|
BLAKE2b-256 checksum How to use checksums |
ffcae37b52b6dbe859d9e32beb74edd83884f54b0a5b96876e90e033ce9237bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / pandion-0.1.0-py3-none-any.whl
| Download URL | pandion-0.1.0-py3-none-any.whl |
|---|---|
| Size | 170.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d2784d6985f51f887472db7effd9fa24b3d59c78800aecdc417c0e2f368df98
|
|
BLAKE2b-256 checksum How to use checksums |
4edac349197af7ad25844b55e58708f2e79d62ce708c2a60682f93f3b2972acc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency log