Skip to main content

Multimodal retrieval engine

Project description

bicardinal - multimodal retrieval engine

License PyPI version

bicardinal

Multimodal retrieval engine. Drop in PDFs, Word docs, images, audio, or plain text, bicardinal extracts, summarizes, embeds, and indexes them so you can search across everything with one call.

Install

pip install bicardinal

Set your provider keys (used for OCR, vision, transcription, and summaries):

export OPENAI_API_KEY=sk-...
export MISTRAL_API_KEY=...

Deadly simple

from pathlib import Path
from bicardinal import Bicardinal

store = Bicardinal("./data")          # a home for your collections
col = store.create("docs")            # make a collection
col.init("build")                     # open it for ingestion

# Throw any file at it, pdf, docx, png, mp3, txt...
for path in Path("./my_files").glob("*"):
    col.ingest(path.name, path.read_bytes())

col.finalize() # build the index

# Search across everything
for hit in col.search("quarterly revenue growth", k=5):
    print(f"{hit.score:.3f}  {hit.filename}#{hit.chunk_index}  {hit.raw_text[:80]}")

col.close()

That's it. No pipelines to wire, no embedding code to write.

A little more

# Rank whole files by relevance
for f in col.most_similar_files("budget forecast", k=3):
    print(f.score, f.filename)

# Search within a single document
col.search_in_file("conclusion", "report.pdf", k=5)

# Reopen later, it's all on disk
col = store.open("docs")

See examples/quickstart.py for a fuller tour.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bicardinal-0.0.4.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bicardinal-0.0.4-py3-none-any.whl (769.9 kB view details)

Uploaded Python 3

File details

Details for the file bicardinal-0.0.4.tar.gz.

File metadata

  • Download URL: bicardinal-0.0.4.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for bicardinal-0.0.4.tar.gz
Algorithm Hash digest
SHA256 475c8a74d25ba055f0c2d3fc76534ea9e178cb1f3feaf932bc8ecb0f707f7830
MD5 2247b7bcf992b51c1f15ed44486389ca
BLAKE2b-256 f1b96ba0d20ec620c61c8993ab9a76585a00a500c093bd3e5b0b15b65a1778de

See more details on using hashes here.

File details

Details for the file bicardinal-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: bicardinal-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 769.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for bicardinal-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8d98c33b62198b8e6d2057d0af749696fd2760d08a7dbda95cd7eaa24aef665d
MD5 6a19f736dfd76447edd4ac23f730153f
BLAKE2b-256 b3ad1cf25397686e7ca3c5a7acd53b48c6c962efbb83ac138a3515ce14595f67

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page